зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1433912 - [lint] Only run codespell linter on python/mozlint and tools/lint for now, r=sylvestre
This is a bustage fix that needs to get out quickly. Once landed we can take the time to enable it on more directories, or preferably change it to a blacklist. MozReview-Commit-ID: Gbf7q2L0tg3 --HG-- extra : rebase_source : a58ae64c655b24e686710a663d4538b4cfe020f7
This commit is contained in:
Родитель
e954424179
Коммит
a8b5fc493f
|
@ -90,7 +90,7 @@ class StylishFormatter(object):
|
|||
|
||||
# If there were failures, make it clear which linters failed
|
||||
for fail in failed:
|
||||
message.append("{c}A failure occured in the {name} linter.".format(
|
||||
message.append("{c}A failure occurred in the {name} linter.".format(
|
||||
c=self.color('brightred'),
|
||||
name=fail,
|
||||
))
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
---
|
||||
codespell:
|
||||
description: Check code for common misspellings
|
||||
include: ['.']
|
||||
include:
|
||||
- tools/lint
|
||||
- python/mozlint
|
||||
exclude:
|
||||
- third_party
|
||||
# List of extensions coming from:
|
||||
|
|
|
@ -31,7 +31,7 @@ If you wish to exclude a subdirectory of an included one, you can add it to the
|
|||
directive.
|
||||
|
||||
The default configuration file lives in ``topsrcdir/.flake8``. The default configuration can be
|
||||
overriden for a given subdirectory by creating a new ``.flake8`` file in the subdirectory. Be warned
|
||||
overridden for a given subdirectory by creating a new ``.flake8`` file in the subdirectory. Be warned
|
||||
that ``.flake8`` files cannot inherit from one another, so all configuration you wish to keep must
|
||||
be re-defined.
|
||||
|
||||
|
|
|
@ -245,7 +245,7 @@ module.exports = {
|
|||
// Disallow eval and setInteral/setTimeout with strings
|
||||
"no-implied-eval": "error",
|
||||
|
||||
// No invalid regular expresions
|
||||
// No invalid regular expressions
|
||||
"no-invalid-regexp": "error",
|
||||
|
||||
// No odd whitespace characters
|
||||
|
|
|
@ -136,7 +136,7 @@ function addNodeLines(node, reindent) {
|
|||
// treated differently for indentation
|
||||
let indentFirst = false;
|
||||
|
||||
// Strip off any preceeding whitespace only lines. These are often used to
|
||||
// Strip off any preceding whitespace only lines. These are often used to
|
||||
// format the XML and CDATA blocks.
|
||||
while (lines.length && lines[0].trim() == "") {
|
||||
indentFirst = true;
|
||||
|
@ -172,7 +172,7 @@ function addNodeLines(node, reindent) {
|
|||
startLine++;
|
||||
}
|
||||
|
||||
// Find the preceeding whitespace for all lines that aren't entirely
|
||||
// Find the preceding whitespace for all lines that aren't entirely
|
||||
// whitespace.
|
||||
let indents = lines.filter(s => s.trim().length > 0)
|
||||
.map(s => s.length - s.trimLeft().length);
|
||||
|
|
|
@ -41,7 +41,7 @@ class ShellcheckProcess(ProcessHandlerMixin):
|
|||
try:
|
||||
data = json.loads(line)
|
||||
except JSONDecodeError as e:
|
||||
print('Unable to load shellcheck output: {}'.format(e))
|
||||
print('Unable to load shellcheck output ({}): {}'.format(e, line))
|
||||
return
|
||||
|
||||
for entry in data:
|
||||
|
|
Загрузка…
Ссылка в новой задаче