File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
src/ansiblelint/_internal Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 10
10
from ansiblelint .file_utils import Lintable
11
11
12
12
_logger = logging .getLogger (__name__ )
13
+ LOAD_FAILURE_MD = """\
14
+ ## load-failure
15
+
16
+ Linter failed to process a YAML file, probably because it is either:
17
+
18
+ * contains unsupported encoding (only UTF-8 is supported)
19
+ * not an Ansible file
20
+ * it contains some unsupported custom YAML objects (`!!` prefix)
21
+ * it was not able to decrypt an inline `!vault` block.
22
+
23
+ This violation **is not** skippable, so it cannot be added to the `warn_list`
24
+ or the `skip_list`. If a vault decryption issue cannot be avoided, the
25
+ offending file can be added to `exclude_paths` configuration.
26
+ """
13
27
14
28
15
29
# Derived rules are likely to want to access class members, so:
@@ -130,5 +144,6 @@ class LoadingFailureRule(BaseRule):
130
144
id = "load-failure"
131
145
description = "Linter failed to process a YAML file, possible not an Ansible file."
132
146
severity = "VERY_HIGH"
133
- tags = ["core" ]
147
+ tags = ["core" , "unskippable" ]
134
148
version_added = "v4.3.0"
149
+ help = LOAD_FAILURE_MD
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ You can skip specific rules or tags by adding them to your configuration file:
8
8
# .config/ansible-lint.yml
9
9
warn_list: # or 'skip_list' to silence them completely
10
10
- experimental # all rules tagged as experimental
11
- - load-failure # Failed to load or parse file.
12
11
- no-handler # Tasks that run when changed should likely be handlers.
13
12
- unnamed-task # All tasks should be named.
14
13
- yaml # Violations reported by yamllint.
You can’t perform that action at this time.
0 commit comments