mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
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:
parent
cd0338e45e
commit
2d61b7becb
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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))
|
||||
|
||||
|
@ -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))
|
||||
|
||||
|
@ -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'],
|
||||
|
@ -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))
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user