зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1708293 - [lint] Add a linter to prefer multiline skip-if statements in test manifests, r=releng-reviewers,jmaher
This will warn if someone includes something like: skip-if = <condition A> || <condition B> # reason A is skipped; reason B is skipped Instead they should use: skip-if = <condition A> # reason A is skipped <condition B> # reason B is skipped Differential Revision: https://phabricator.services.mozilla.com/D113707
This commit is contained in:
Родитель
fcb5cf9044
Коммит
730d952a79
|
@ -243,7 +243,7 @@ test-manifest:
|
|||
treeherder:
|
||||
symbol: misc(tm)
|
||||
run:
|
||||
mach: lint -v -l test-disable -f treeherder -f json:/builds/worker/mozlint.json *
|
||||
mach: lint -v -l test-manifest-disable -l test-manifest-skip-if -f treeherder -f json:/builds/worker/mozlint.json *
|
||||
when:
|
||||
files-changed:
|
||||
- '**/*.ini'
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
multiline-skip-if:
|
||||
description: Conditions joined by || should be on separate lines
|
||||
hint: |
|
||||
skip-if =
|
||||
<condition one> # reason
|
||||
<condition two> # reason
|
||||
exclude:
|
||||
- "**/application.ini"
|
||||
- "**/l10n.ini"
|
||||
- dom/canvas/test/webgl-conf/mochitest-errata.ini
|
||||
- testing/mozbase/manifestparser/tests
|
||||
- testing/web-platform
|
||||
- xpcom/tests/unit/data
|
||||
extensions: ['ini']
|
||||
level: warning
|
||||
type: regex
|
||||
payload: '^\s*(skip|fail)-if\s*=[^(]*\|\|'
|
Загрузка…
Ссылка в новой задаче