Bug 1387862 - Lint python/mozlint yaml files. r=ahal

We should have CI Lint YAML files in the tree.

MozReview-Commit-ID: IMOKGhxKFJW

--HG--
extra : rebase_source : 0ef71f24141a531833d48f2a305183dd808f00f5
This commit is contained in:
Justin Wood 2017-08-06 13:43:04 -04:00
parent 0985529c39
commit 906fda8397
13 changed files with 19 additions and 2 deletions

View File

@ -1,3 +1,4 @@
---
BadReturnCodeLinter:
description: Returns an error code no matter what
include:

View File

@ -1,3 +1,4 @@
---
ExplicitPathLinter:
description: Only lint a specific file name
rule: no-foobar

View File

@ -1,3 +1,4 @@
---
ExternalLinter:
description: It's bad to have the string foobar in js files.
include:

View File

@ -1,3 +1,4 @@
---
BadExcludeLinter:
description: Has an invalid exclude directive.
exclude: [0, 1] # should be a list of strings

View File

@ -1,3 +1,4 @@
---
BadExtensionLinter:
description: Has an invalid file extension.
type: string

View File

@ -1,3 +1,4 @@
---
BadIncludeLinter:
description: Has an invalid include directive.
include: should be a list

View File

@ -1,3 +1,4 @@
---
BadTypeLinter:
description: Has an invalid type.
type: invalid

View File

@ -1,2 +1,3 @@
---
MissingAttrsLinter:
description: Missing type and payload

View File

@ -1,3 +1,4 @@
---
RaisesLinter:
description: Raises an exception
type: external

View File

@ -1,5 +1,8 @@
---
RegexLinter:
description: Make sure the string foobar never appears in a js variable file because it is bad.
description: >-
Make sure the string foobar never appears in a js variable
file because it is bad.
rule: no-foobar
include:
- '**/*.js'

View File

@ -1,5 +1,8 @@
---
StringLinter:
description: Make sure the string foobar never appears in browser js files because it is bad
description: >-
Make sure the string foobar never appears in browser js
files because it is bad
rule: no-foobar
include:
- '**/*.js'

View File

@ -1,3 +1,4 @@
---
StructuredLinter:
description: "It's bad to have the string foobar in js files."
include:

View File

@ -2,6 +2,7 @@ yamllint:
description: YAML linter
include:
- .cron.yml
- python/mozlint/
- taskcluster
extensions: ['yml', 'yaml']
type: external