Merge pull request 'ci(lint): enable and gate ansible-lint's complexity rule' (#397) from ci/138-complexity-gate into main
Reviewed-on: #397
This commit was merged in pull request #397.
This commit is contained in:
commit
9c415ee347
3 files changed
+11
-6
No files matched your search
+5
-4
@@ -24,7 +24,8 @@ exclude_paths:
|
|||||||
supported_ansible_also:
|
supported_ansible_also:
|
||||||
- "2.22."
|
- "2.22."
|
||||||
|
|
||||||
skip_list:
|
# complexity runs at the default max_tasks (100) until the schema accepts the key (#139). An empty
|
||||||
# role-name requires ^[a-z][a-z0-9_]*$, which rejects the leading underscore that marks an
|
# warn_list makes experimental rules (complexity), jinja[spacing] and fqcn[deep] fail Lint.
|
||||||
# internal role (_binary_update), as in prometheus.prometheus (roles/_common).
|
enable_list:
|
||||||
- role-name
|
- 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/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/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]
|
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.
|
*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
|
- **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:*
|
(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
|
- **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.
|
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.
|
review that each new internal role has it.
|
||||||
- **`role-name` for internal roles.** An internal role is exempted from ansible-lint `role-name`
|
- **`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.
|
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