Bug 1499089 - Handle warnings without a line number correctly r=ahal
authorGabriele Svelto <gsvelto@mozilla.com>
Tue, 16 Oct 2018 13:46:32 +0000
changeset 499945 188475039aa5c7c9d3ea09fa3d150f41a246a3e3
parent 499944 3361fcc40ea294df9eed70a218c0eafe11bf60a7
child 499946 355899b1b22fed0f5fcc94d5bd95b7205f94b499
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1499089
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1499089 - Handle warnings without a line number correctly r=ahal Differential Revision: https://phabricator.services.mozilla.com/D8737
tools/lint/eslint/__init__.py
--- a/tools/lint/eslint/__init__.py
+++ b/tools/lint/eslint/__init__.py
@@ -104,15 +104,15 @@ def lint(paths, config, binary=None, fix
     results = []
     for obj in jsonresult:
         errors = obj['messages']
 
         for err in errors:
             err.update({
                 'hint': err.get('fix'),
                 'level': 'error' if err['severity'] == 2 else 'warning',
-                'lineno': err.get('line'),
+                'lineno': err.get('line') or 0,
                 'path': obj['filePath'],
                 'rule': err.get('ruleId'),
             })
             results.append(result.from_config(config, **err))
 
     return results