fix: add 'rescue' to allowed prevlines for CheckTaskSeparation (#240)

This commit is contained in:
Robert Kaussow 2021-10-11 16:12:35 +02:00 committed by GitHub
parent c6e9153aa9
commit b8d4783646
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ class CheckTaskSeparation(StandardBase):
task_regex = re.compile(r"-\sname:(.*)")
prevline = "#file_start_marker"
allowed_prevline = ["---", "tasks:", "pre_tasks:", "post_tasks:", "block:"]
allowed_prevline = ["---", "tasks:", "pre_tasks:", "post_tasks:", "block:", "rescue:"]
errors = task_errors + line_errors
if not errors:

View File

@ -15,7 +15,7 @@ Reviews are useless without some rules or standards to check against. ansible-la
| CheckYamlHasContent | LINT0007 | Files should contain useful content. | |
| CheckNativeYaml | LINT0008 | Use YAML format for tasks and handlers rather than key=value. | {native-yaml: {exclude: []}} |
| CheckYamlDocumentEnd | LINT0009 | YAML should contain document end marker. | {document-end: {present: true}} |
| CheckLineBetweenTasks | ANSIBLE0001 | Single tasks should be separated by an empty line. | |
| CheckTaskSeparation | ANSIBLE0001 | Single tasks should be separated by an empty line. | |
| CheckMetaMain | ANSIBLE0002 | Meta file should contain a basic subset of parameters. | author, description, min_ansible_version, platforms, dependencies |
| CheckUniqueNamedTask | ANSIBLE0003 | Tasks and handlers must be uniquely named within a file. | |
| CheckBraces | ANSIBLE0004 | YAML should use consistent number of spaces around variables. | {double-braces: max-spaces-inside: 1, min-spaces-inside: 1} |