Bug 1460856 - [mozlint] Stop using warnings in all current linters r=Standard8

Soon, warnings will be suppressed by default and won't causes a failure.
Therefore to prevent loss of coverage, we need to make sure that any
lint warning that causes a failure today, needs to be converted to an
error so it keeps failing tomorrow.

Depends on D3819

Differential Revision: https://phabricator.services.mozilla.com/D3820

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrew Halberstadt 2018-08-28 19:24:55 +00:00
parent cd0338e45e
commit 2d61b7becb
7 changed files with 9 additions and 17 deletions

View File

@ -2,7 +2,7 @@
cpp-virtual-final:
description: "Virtual function declarations should specify only one of
`virtual`, `final`, or `override`"
level: warning
level: error
include: ['.']
exclude:
# Third-party code with cpp-virtual-final warnings:

View File

@ -22,5 +22,5 @@ mingw-capitalization:
- toolkit/crashreporter/google-breakpad/src/common/windows
- third_party/python/psutil/psutil
type: external
level: warning
level: error
payload: cpp.mingw-capitalization:lint

View File

@ -73,12 +73,8 @@ class Flake8Process(ProcessHandlerMixin):
print('Non JSON output from linter, will not be processed: {}'.format(line))
return
if 'code' in res:
if res['code'].startswith('W'):
res['level'] = 'warning'
if res['code'] in LINE_OFFSETS:
res['lineoffset'] = LINE_OFFSETS[res['code']]
if res.get('code') in LINE_OFFSETS:
res['lineoffset'] = LINE_OFFSETS[res['code']]
results.append(result.from_config(self.config, **res))

View File

@ -82,12 +82,8 @@ class Flake8Process(ProcessHandlerMixin):
print('Non JSON output from linter, will not be processed: {}'.format(line))
return
if 'code' in res:
if res['code'].startswith('W'):
res['level'] = 'warning'
if res['code'] in LINE_OFFSETS:
res['lineoffset'] = LINE_OFFSETS[res['code']]
if res.get('code') in LINE_OFFSETS:
res['lineoffset'] = LINE_OFFSETS[res['code']]
results.append(result.from_config(self.config, **res))

View File

@ -48,7 +48,7 @@ class ShellcheckProcess(ProcessHandlerMixin):
res = {
'path': entry['file'],
'message': entry['message'],
'level': 'error' if entry['level'] == 'error' else 'warning',
'level': 'error',
'lineno': entry['line'],
'column': entry['column'],
'rule': entry['code'],

View File

@ -61,7 +61,7 @@ class CodespellProcess(ProcessHandlerMixin):
return
res = {'path': os.path.relpath(abspath, self.config['root']),
'message': typo + " ==> " + correct,
'level': "warning",
'level': 'error',
'lineno': line,
}
results.append(result.from_config(self.config, **res))

View File

@ -46,7 +46,7 @@ class YAMLLintProcess(ProcessHandlerMixin):
res = {'path': os.path.relpath(abspath, self.config['root']),
'message': message,
'level': level,
'level': 'error',
'lineno': line,
'column': col,
'rule': code,