ci(lint): enable and gate ansible-lint's complexity rule #397
No files matched your search
+5
-4
@@ -24,7 +24,8 @@ exclude_paths:
|
||||
supported_ansible_also:
|
||||
- "2.22."
|
||||
|
||||
skip_list:
|
||||
# role-name requires ^[a-z][a-z0-9_]*$, which rejects the leading underscore that marks an
|
||||
# internal role (_binary_update), as in prometheus.prometheus (roles/_common).
|
||||
- role-name
|
||||
# complexity runs at the default max_tasks (100) until the schema accepts the key (#139). An empty
|
||||
# warn_list makes experimental rules (complexity), jinja[spacing] and fqcn[deep] fail Lint.
|
||||
enable_list:
|
||||
- complexity
|
||||
warn_list: []
|
||||
@@ -9,3 +9,6 @@ roles/_binary_update/molecule/check_mode/verify.yml var-naming[no-role-prefix]
|
||||
roles/_binary_update/molecule/default/verify.yml var-naming[no-role-prefix]
|
||||
roles/_binary_update/molecule/default/tasks/assert_state.yml var-naming[no-role-prefix]
|
||||
roles/_binary_update/molecule/resources/roles/binary_update_caller/tasks/main.yml var-naming[no-role-prefix]
|
||||
# role-name requires ^[a-z][a-z0-9_]*$, which rejects the leading underscore that marks an
|
||||
# internal role (_binary_update), as in prometheus.prometheus (roles/_common).
|
||||
roles/_binary_update role-name
|
||||
+3
-2
@@ -18,7 +18,7 @@ names a check that does not exist yet and its backlog issue.
|
||||
*Why:* a consumer finds the same thing in the same place. *Held:* review.
|
||||
- **Complexity.** A task file stays within ansible-lint's `complexity` limit, `max_tasks` 100
|
||||
(40 once ansible-lint accepts the key). *Why:* a long task file is hard to review. *Held:*
|
||||
review until the Lint job enables `complexity` and fails on it (#138).
|
||||
control, ansible-lint `complexity` in the Lint job.
|
||||
- **Roadmap.** The pull request that adds a role removes it from the README "Roadmap" list, and
|
||||
the section goes when the list is empty. *Why:* the list is useful only if true. *Held:* review.
|
||||
|
||||
@@ -125,4 +125,5 @@ names a check that does not exist yet and its backlog issue.
|
||||
review that each new internal role has it.
|
||||
- **`role-name` for internal roles.** An internal role is exempted from ansible-lint `role-name`
|
||||
by its own line in `.ansible-lint-ignore`. *Why:* a misnamed public role must still fail.
|
||||
*Held:* review; until #138 replaces it, `.ansible-lint` skips `role-name` repository-wide.
|
||||
*Held:* control, ansible-lint `role-name` in the Lint job; review that each new internal role
|
||||
has its line.
|
||||
Reference in new issue
Block a user