diff --git a/src/ansiblelint/_internal/rules.py b/src/ansiblelint/_internal/rules.py index f3e7294b151..9bc1e256eb4 100644 --- a/src/ansiblelint/_internal/rules.py +++ b/src/ansiblelint/_internal/rules.py @@ -71,7 +71,7 @@ def __lt__(self, other: "BaseRule") -> bool: class RuntimeErrorRule(BaseRule): """Used to identify errors.""" - id = '999' + id = 'internal-error' shortdesc = 'Unexpected internal error' description = ( 'This error can be caused by internal bugs but also by ' @@ -86,7 +86,7 @@ class RuntimeErrorRule(BaseRule): class AnsibleParserErrorRule(BaseRule): """Used to mark errors received from Ansible.""" - id = '998' + id = 'parser-error' shortdesc = 'AnsibleParserError' description = ( 'Ansible parser fails, this usually indicate invalid file.') @@ -98,7 +98,7 @@ class AnsibleParserErrorRule(BaseRule): class LoadingFailureRule(BaseRule): """File loading failure.""" - id = '901' + id = 'load-failure' shortdesc = 'Failed to load or parse file' description = 'Linter failed to process a YAML file, possible not an Ansible file.' severity = 'VERY_HIGH' diff --git a/src/ansiblelint/generate_docs.py b/src/ansiblelint/generate_docs.py index 7a022d85e6f..22489eda1ee 100644 --- a/src/ansiblelint/generate_docs.py +++ b/src/ansiblelint/generate_docs.py @@ -30,26 +30,26 @@ def rules_as_rst(rules: RulesCollection) -> str: r = DOC_HEADER for d in rules: - if not hasattr(d, 'id'): - _logger.warning( - "Rule %s skipped from being documented as it does not have an `id` attribute.", - d.__class__.__name__) - continue + # if not hasattr(d, 'id'): + # _logger.warning( + # "Rule %s skipped from being documented as it does not have an `id` attribute.", + # d.__class__.__name__) + # continue - if d.id.endswith('01'): + # if d.id.endswith('01'): - section = '{} Rules ({}xx)'.format( - d.tags[0].title(), - d.id[-3:-2]) - r += f'\n\n{section}\n{ "-" * len(section) }' + # section = '{} Rules ({}xx)'.format( + # d.tags[0].title(), + # d.id[-3:-2]) + # r += f'\n\n{section}\n{ "-" * len(section) }' - title = f"{d.id}: {d.shortdesc}" + title = f"{d.id}" description = d.description if d.link: description += " `(more) <%s>`_" % d.link - r += f"\n\n.. _{d.id}:\n\n{title}\n{'*' * len(title)}\n\n{description}" + r += f"\n\n.. _{d.id}:\n\n{title}\n{'*' * len(title)}\n\n{d.shortdesc}\n\n{description}" return r diff --git a/src/ansiblelint/rules/AnsibleSyntaxCheckRule.py b/src/ansiblelint/rules/AnsibleSyntaxCheckRule.py index 6e55c7e587d..ad3766a0963 100644 --- a/src/ansiblelint/rules/AnsibleSyntaxCheckRule.py +++ b/src/ansiblelint/rules/AnsibleSyntaxCheckRule.py @@ -24,7 +24,7 @@ class AnsibleSyntaxCheckRule(AnsibleLintRule): """Ansible syntax check report failure.""" - id = "911" + id = "syntax-check" shortdesc = "Ansible syntax check failed" description = "Running ansible-playbook --syntax-check ... reported an error." severity = "VERY_HIGH" diff --git a/src/ansiblelint/rules/BecomeUserWithoutBecomeRule.py b/src/ansiblelint/rules/BecomeUserWithoutBecomeRule.py index 15b32d51356..cf32541d313 100644 --- a/src/ansiblelint/rules/BecomeUserWithoutBecomeRule.py +++ b/src/ansiblelint/rules/BecomeUserWithoutBecomeRule.py @@ -74,11 +74,11 @@ def _become_user_without_become(becomeuserabove: bool, data: "odict[str, Any]") class BecomeUserWithoutBecomeRule(AnsibleLintRule): - id = '501' + id = 'partial-become' shortdesc = 'become_user requires become to work as expected' description = '``become_user`` without ``become`` will not actually change user' severity = 'VERY_HIGH' - tags = ['task', 'unpredictability'] + tags = ['unpredictability'] version_added = 'historic' def matchplay(self, file: "Lintable", data: "odict[str, Any]") -> List["MatchError"]: diff --git a/src/ansiblelint/rules/CommandHasChangesCheckRule.py b/src/ansiblelint/rules/CommandHasChangesCheckRule.py index 83ac6d71bc4..1677a830f3a 100644 --- a/src/ansiblelint/rules/CommandHasChangesCheckRule.py +++ b/src/ansiblelint/rules/CommandHasChangesCheckRule.py @@ -24,7 +24,7 @@ class CommandHasChangesCheckRule(AnsibleLintRule): - id = '301' + id = 'no-changed-when' shortdesc = 'Commands should not change things if nothing needs doing' description = ( 'Commands should either read information (and thus set ' diff --git a/src/ansiblelint/rules/CommandsInsteadOfArgumentsRule.py b/src/ansiblelint/rules/CommandsInsteadOfArgumentsRule.py index c77966e3616..26da570aa87 100644 --- a/src/ansiblelint/rules/CommandsInsteadOfArgumentsRule.py +++ b/src/ansiblelint/rules/CommandsInsteadOfArgumentsRule.py @@ -26,14 +26,14 @@ class CommandsInsteadOfArgumentsRule(AnsibleLintRule): - id = '302' + id = 'deprecated-command-syntax' shortdesc = 'Using command rather than an argument to e.g. file' description = ( 'Executing a command when there are arguments to modules ' 'is generally a bad idea' ) severity = 'VERY_HIGH' - tags = ['command-shell', 'resources'] + tags = ['command-shell', 'deprecations'] version_added = 'historic' _commands = ['command', 'shell', 'raw'] diff --git a/src/ansiblelint/rules/CommandsInsteadOfModulesRule.py b/src/ansiblelint/rules/CommandsInsteadOfModulesRule.py index 721ed7d88fc..406e9d46ede 100644 --- a/src/ansiblelint/rules/CommandsInsteadOfModulesRule.py +++ b/src/ansiblelint/rules/CommandsInsteadOfModulesRule.py @@ -26,7 +26,7 @@ class CommandsInsteadOfModulesRule(AnsibleLintRule): - id = '303' + id = 'command-instead-of-module' shortdesc = 'Using command rather than module' description = ( 'Executing a command when there is an Ansible module ' diff --git a/src/ansiblelint/rules/ComparisonToEmptyStringRule.py b/src/ansiblelint/rules/ComparisonToEmptyStringRule.py index df27c0132b5..1b6faa9759a 100644 --- a/src/ansiblelint/rules/ComparisonToEmptyStringRule.py +++ b/src/ansiblelint/rules/ComparisonToEmptyStringRule.py @@ -8,7 +8,7 @@ class ComparisonToEmptyStringRule(AnsibleLintRule): - id = '602' + id = 'empty-string-compare' shortdesc = "Don't compare to empty string" description = ( 'Use ``when: var|length > 0`` rather than ``when: var != ""`` (or ' diff --git a/src/ansiblelint/rules/ComparisonToLiteralBoolRule.py b/src/ansiblelint/rules/ComparisonToLiteralBoolRule.py index e34125bc9b3..4b574d064cd 100644 --- a/src/ansiblelint/rules/ComparisonToLiteralBoolRule.py +++ b/src/ansiblelint/rules/ComparisonToLiteralBoolRule.py @@ -7,7 +7,7 @@ class ComparisonToLiteralBoolRule(AnsibleLintRule): - id = '601' + id = 'literal-compare' shortdesc = "Don't compare to literal True/False" description = ( 'Use ``when: var`` rather than ``when: var == True`` ' diff --git a/src/ansiblelint/rules/DeprecatedModuleRule.py b/src/ansiblelint/rules/DeprecatedModuleRule.py index 8225ffbd0e2..701be85f428 100644 --- a/src/ansiblelint/rules/DeprecatedModuleRule.py +++ b/src/ansiblelint/rules/DeprecatedModuleRule.py @@ -6,7 +6,7 @@ class DeprecatedModuleRule(AnsibleLintRule): - id = '105' + id = 'deprecated-module' shortdesc = 'Deprecated module' description = ( 'These are deprecated modules, some modules are kept ' diff --git a/src/ansiblelint/rules/EnvVarsInCommandRule.py b/src/ansiblelint/rules/EnvVarsInCommandRule.py index bad9f2207b9..36d14ec56f8 100644 --- a/src/ansiblelint/rules/EnvVarsInCommandRule.py +++ b/src/ansiblelint/rules/EnvVarsInCommandRule.py @@ -25,14 +25,14 @@ class EnvVarsInCommandRule(AnsibleLintRule): - id = '304' + id = 'inline-env-var' shortdesc = "Command module does not accept setting environment variables inline" description = ( 'Use ``environment:`` to set environment variables ' 'or use ``shell`` module which accepts both' ) severity = 'VERY_HIGH' - tags = ['command-shell', 'bug'] + tags = ['command-shell', 'idiom'] version_added = 'historic' expected_args = ['chdir', 'creates', 'executable', 'removes', 'stdin', 'warn', diff --git a/src/ansiblelint/rules/GitHasVersionRule.py b/src/ansiblelint/rules/GitHasVersionRule.py index e4102fad734..94ff7a3665f 100644 --- a/src/ansiblelint/rules/GitHasVersionRule.py +++ b/src/ansiblelint/rules/GitHasVersionRule.py @@ -24,14 +24,14 @@ class GitHasVersionRule(AnsibleLintRule): - id = '401' + id = 'git-latest' shortdesc = 'Git checkouts must contain explicit version' description = ( 'All version control checkouts must point to ' 'an explicit commit or tag, not just ``latest``' ) severity = 'MEDIUM' - tags = ['module', 'repeatability'] + tags = ['idempotency'] version_added = 'historic' def matchtask(self, task: Dict[str, Any]) -> Union[bool, str]: diff --git a/src/ansiblelint/rules/IncludeMissingFileRule.py b/src/ansiblelint/rules/IncludeMissingFileRule.py index 9042cbd07cc..b7e13e82a9c 100644 --- a/src/ansiblelint/rules/IncludeMissingFileRule.py +++ b/src/ansiblelint/rules/IncludeMissingFileRule.py @@ -17,15 +17,15 @@ class IncludeMissingFileRule(AnsibleLintRule): - id = '505' + id = 'missing-import' shortdesc = 'referenced files must exist' description = ( - 'All files referenced by by include / import tasks ' + 'All files referenced by include / import tasks ' 'must exist. The check excludes files with jinja2 ' 'templates in the filename.' ) severity = 'MEDIUM' - tags = ['task', 'bug'] + tags = ['idiom'] version_added = 'v4.3.0' def matchplay(self, file: "Lintable", data: "odict[str, Any]") -> List["MatchError"]: diff --git a/src/ansiblelint/rules/MercurialHasRevisionRule.py b/src/ansiblelint/rules/MercurialHasRevisionRule.py index a0ef8ff84b2..d2d69f849a9 100644 --- a/src/ansiblelint/rules/MercurialHasRevisionRule.py +++ b/src/ansiblelint/rules/MercurialHasRevisionRule.py @@ -24,14 +24,14 @@ class MercurialHasRevisionRule(AnsibleLintRule): - id = '402' + id = 'hg-latest' shortdesc = 'Mercurial checkouts must contain explicit revision' description = ( 'All version control checkouts must point to ' 'an explicit commit or tag, not just ``latest``' ) severity = 'MEDIUM' - tags = ['module', 'repeatability'] + tags = ['idempotency'] version_added = 'historic' def matchtask(self, task: Dict[str, Any]) -> Union[bool, str]: diff --git a/src/ansiblelint/rules/MetaChangeFromDefaultRule.py b/src/ansiblelint/rules/MetaChangeFromDefaultRule.py index 37e979adfd7..40caa639e93 100644 --- a/src/ansiblelint/rules/MetaChangeFromDefaultRule.py +++ b/src/ansiblelint/rules/MetaChangeFromDefaultRule.py @@ -13,7 +13,7 @@ class MetaChangeFromDefaultRule(AnsibleLintRule): - id = '703' + id = 'meta-incorrect' shortdesc = 'meta/main.yml default values should be changed' field_defaults = [ ('author', 'your name'), diff --git a/src/ansiblelint/rules/MetaMainHasInfoRule.py b/src/ansiblelint/rules/MetaMainHasInfoRule.py index 70c00a4e3e5..32713723062 100644 --- a/src/ansiblelint/rules/MetaMainHasInfoRule.py +++ b/src/ansiblelint/rules/MetaMainHasInfoRule.py @@ -52,7 +52,7 @@ def _galaxy_info_errors_itr( class MetaMainHasInfoRule(AnsibleLintRule): - id = '701' + id = 'meta-no-info' shortdesc = 'meta/main.yml should contain relevant info' str_info = META_STR_INFO info = META_INFO diff --git a/src/ansiblelint/rules/MetaTagValidRule.py b/src/ansiblelint/rules/MetaTagValidRule.py index f79391559fd..8fe731f703a 100644 --- a/src/ansiblelint/rules/MetaTagValidRule.py +++ b/src/ansiblelint/rules/MetaTagValidRule.py @@ -15,7 +15,7 @@ class MetaTagValidRule(AnsibleLintRule): - id = '702' + id = 'meta-no-tags' shortdesc = 'Tags must contain lowercase letters and digits only' description = ( 'Tags must contain lowercase letters and digits only, ' diff --git a/src/ansiblelint/rules/MetaVideoLinksRule.py b/src/ansiblelint/rules/MetaVideoLinksRule.py index 16daae01ee1..a783424a958 100644 --- a/src/ansiblelint/rules/MetaVideoLinksRule.py +++ b/src/ansiblelint/rules/MetaVideoLinksRule.py @@ -14,7 +14,7 @@ class MetaVideoLinksRule(AnsibleLintRule): - id = '704' + id = 'meta-video-links' shortdesc = "meta/main.yml video_links should be formatted correctly" description = ( 'Items in ``video_links`` in meta/main.yml should be ' diff --git a/src/ansiblelint/rules/MissingFilePermissionsRule.py b/src/ansiblelint/rules/MissingFilePermissionsRule.py index 1cca5ca397d..1aae5d27531 100644 --- a/src/ansiblelint/rules/MissingFilePermissionsRule.py +++ b/src/ansiblelint/rules/MissingFilePermissionsRule.py @@ -29,7 +29,7 @@ class MissingFilePermissionsRule(AnsibleLintRule): - id = "208" + id = "risky-file-permisions" shortdesc = 'File permissions unset or incorrect' description = ( "Missing or unsupported mode parameter can cause unexpected file " diff --git a/src/ansiblelint/rules/NestedJinjaRule.py b/src/ansiblelint/rules/NestedJinjaRule.py index 64dadbbb663..73792ae00e9 100644 --- a/src/ansiblelint/rules/NestedJinjaRule.py +++ b/src/ansiblelint/rules/NestedJinjaRule.py @@ -28,7 +28,7 @@ class NestedJinjaRule(AnsibleLintRule): - id = '207' + id = 'no-jinja-nesting' shortdesc = 'Nested jinja pattern' description = ( "There should not be any nested jinja pattern. " diff --git a/src/ansiblelint/rules/NoFormattingInWhenRule.py b/src/ansiblelint/rules/NoFormattingInWhenRule.py index c684c834e2d..eb3e9780301 100644 --- a/src/ansiblelint/rules/NoFormattingInWhenRule.py +++ b/src/ansiblelint/rules/NoFormattingInWhenRule.py @@ -9,7 +9,7 @@ class NoFormattingInWhenRule(AnsibleLintRule): - id = '102' + id = 'no-jinja-when' shortdesc = 'No Jinja2 in when' description = '``when`` is a raw Jinja2 expression, remove redundant {{ }} from variable(s).' severity = 'HIGH' diff --git a/src/ansiblelint/rules/NoTabsRule.py b/src/ansiblelint/rules/NoTabsRule.py index c576cea9974..a44fc142a91 100644 --- a/src/ansiblelint/rules/NoTabsRule.py +++ b/src/ansiblelint/rules/NoTabsRule.py @@ -7,7 +7,7 @@ class NoTabsRule(AnsibleLintRule): - id = '203' + id = 'no-tabs' shortdesc = 'Most files should not contain tabs' description = 'Tabs can cause unexpected display issues, use spaces' severity = 'LOW' diff --git a/src/ansiblelint/rules/OctalPermissionsRule.py b/src/ansiblelint/rules/OctalPermissionsRule.py index 6ad7fd37b7d..b514dc213df 100644 --- a/src/ansiblelint/rules/OctalPermissionsRule.py +++ b/src/ansiblelint/rules/OctalPermissionsRule.py @@ -24,7 +24,7 @@ class OctalPermissionsRule(AnsibleLintRule): - id = '202' + id = 'risky-octal' shortdesc = 'Octal file permissions must contain leading zero or be a string' description = ( 'Numeric file permissions without leading zero can behave ' diff --git a/src/ansiblelint/rules/PackageIsNotLatestRule.py b/src/ansiblelint/rules/PackageIsNotLatestRule.py index 18a902b5377..ddf61c14c24 100644 --- a/src/ansiblelint/rules/PackageIsNotLatestRule.py +++ b/src/ansiblelint/rules/PackageIsNotLatestRule.py @@ -24,14 +24,14 @@ class PackageIsNotLatestRule(AnsibleLintRule): - id = '403' + id = 'package-latest' shortdesc = 'Package installs should not use latest' description = ( 'Package installs should use ``state=present`` ' 'with or without a version' ) severity = 'VERY_LOW' - tags = ['module', 'repeatability'] + tags = ['idempotency'] version_added = 'historic' _package_managers = [ diff --git a/src/ansiblelint/rules/PlaybookExtension.py b/src/ansiblelint/rules/PlaybookExtension.py index 5996ad6cacd..a49376377bf 100644 --- a/src/ansiblelint/rules/PlaybookExtension.py +++ b/src/ansiblelint/rules/PlaybookExtension.py @@ -10,7 +10,7 @@ class PlaybookExtension(AnsibleLintRule): - id = '205' + id = 'playbook-extension' shortdesc = 'Use ".yml" or ".yaml" playbook extension' description = 'Playbooks should have the ".yml" or ".yaml" extension' severity = 'MEDIUM' diff --git a/src/ansiblelint/rules/RoleLoopVarPrefix.py b/src/ansiblelint/rules/RoleLoopVarPrefix.py index 1905dc96083..ac2ca3576de 100644 --- a/src/ansiblelint/rules/RoleLoopVarPrefix.py +++ b/src/ansiblelint/rules/RoleLoopVarPrefix.py @@ -25,7 +25,7 @@ class RoleLoopVarPrefix(AnsibleLintRule): Looping inside roles has the risk of clashing with loops from user-playbooks.\ """ - tags = ['no-loop-var-prefix', 'safety'] + tags = ['idiom'] prefix = "" severity = 'MEDIUM' diff --git a/src/ansiblelint/rules/RoleNames.py b/src/ansiblelint/rules/RoleNames.py index eeae96819bb..71a0c6c2360 100644 --- a/src/ansiblelint/rules/RoleNames.py +++ b/src/ansiblelint/rules/RoleNames.py @@ -39,7 +39,7 @@ def _remove_prefix(text: str, prefix: str) -> str: class RoleNames(AnsibleLintRule): - id = '106' + id = 'role-name' shortdesc = ( "Role name {0} does not match ``%s`` pattern" % ROLE_NAME_REGEX ) diff --git a/src/ansiblelint/rules/RoleRelativePath.py b/src/ansiblelint/rules/RoleRelativePath.py index 7a5c5793ac8..06f58328f28 100644 --- a/src/ansiblelint/rules/RoleRelativePath.py +++ b/src/ansiblelint/rules/RoleRelativePath.py @@ -7,11 +7,11 @@ class RoleRelativePath(AnsibleLintRule): - id = '404' + id = 'no-relative-paths' shortdesc = "Doesn't need a relative path in role" description = '``copy`` and ``template`` do not need to use relative path for ``src``' severity = 'HIGH' - tags = ['module'] + tags = ['idiom'] version_added = 'v4.0.0' _module_to_path_folder = { diff --git a/src/ansiblelint/rules/ShellWithoutPipefail.py b/src/ansiblelint/rules/ShellWithoutPipefail.py index 373b4c081c8..801f9a2d631 100644 --- a/src/ansiblelint/rules/ShellWithoutPipefail.py +++ b/src/ansiblelint/rules/ShellWithoutPipefail.py @@ -5,7 +5,7 @@ class ShellWithoutPipefail(AnsibleLintRule): - id = '306' + id = 'risky-shell-pipe' shortdesc = 'Shells that use pipes should set the pipefail option' description = ( 'Without the pipefail option set, a shell command that ' diff --git a/src/ansiblelint/rules/TaskHasNameRule.py b/src/ansiblelint/rules/TaskHasNameRule.py index f4ee1bbdea2..5f1ebc772e9 100644 --- a/src/ansiblelint/rules/TaskHasNameRule.py +++ b/src/ansiblelint/rules/TaskHasNameRule.py @@ -24,14 +24,14 @@ class TaskHasNameRule(AnsibleLintRule): - id = '502' + id = 'unamed-task' shortdesc = 'All tasks should be named' description = ( 'All tasks should have a distinct name for readability ' 'and for ``--start-at-task`` to work' ) severity = 'MEDIUM' - tags = ['task', 'readability'] + tags = ['idiom'] version_added = 'historic' _nameless_tasks = ['meta', 'debug', 'include_role', 'import_role', diff --git a/src/ansiblelint/rules/TaskNoLocalAction.py b/src/ansiblelint/rules/TaskNoLocalAction.py index 96b9e279fe1..04afaa13adc 100644 --- a/src/ansiblelint/rules/TaskNoLocalAction.py +++ b/src/ansiblelint/rules/TaskNoLocalAction.py @@ -5,11 +5,11 @@ class TaskNoLocalAction(AnsibleLintRule): - id = '504' + id = 'deprecated-local-action' shortdesc = "Do not use 'local_action', use 'delegate_to: localhost'" description = 'Do not use ``local_action``, use ``delegate_to: localhost``' severity = 'MEDIUM' - tags = ['task'] + tags = ['deprecations'] version_added = 'v4.0.0' def match(self, line: str) -> bool: diff --git a/src/ansiblelint/rules/UseCommandInsteadOfShellRule.py b/src/ansiblelint/rules/UseCommandInsteadOfShellRule.py index f22a3e15bba..221fa58a67f 100644 --- a/src/ansiblelint/rules/UseCommandInsteadOfShellRule.py +++ b/src/ansiblelint/rules/UseCommandInsteadOfShellRule.py @@ -24,7 +24,7 @@ class UseCommandInsteadOfShellRule(AnsibleLintRule): - id = '305' + id = 'command-instead-of-shell' shortdesc = 'Use shell only when shell functionality is required' description = ( 'Shell should only be used when piping, redirecting ' @@ -32,7 +32,7 @@ class UseCommandInsteadOfShellRule(AnsibleLintRule): 'for some of those!)' ) severity = 'HIGH' - tags = ['command-shell', 'safety'] + tags = ['command-shell', 'idiom'] version_added = 'historic' def matchtask(self, task: Dict[str, Any]) -> Union[bool, str]: diff --git a/src/ansiblelint/rules/UseHandlerRatherThanWhenChangedRule.py b/src/ansiblelint/rules/UseHandlerRatherThanWhenChangedRule.py index 44bd9e4279b..b34fdf93f92 100644 --- a/src/ansiblelint/rules/UseHandlerRatherThanWhenChangedRule.py +++ b/src/ansiblelint/rules/UseHandlerRatherThanWhenChangedRule.py @@ -31,14 +31,14 @@ def _changed_in_when(item: str) -> bool: class UseHandlerRatherThanWhenChangedRule(AnsibleLintRule): - id = '503' + id = 'no-handler' shortdesc = 'Tasks that run when changed should likely be handlers' description = ( 'If a task has a ``when: result.changed`` setting, it is effectively ' 'acting as a handler' ) severity = 'MEDIUM' - tags = ['task', 'behaviour'] + tags = ['idiom'] version_added = 'historic' def matchtask(self, task: Dict[str, Any]) -> Union[bool, str]: diff --git a/src/ansiblelint/rules/UsingBareVariablesIsDeprecatedRule.py b/src/ansiblelint/rules/UsingBareVariablesIsDeprecatedRule.py index 12110c7021d..06f108643c5 100644 --- a/src/ansiblelint/rules/UsingBareVariablesIsDeprecatedRule.py +++ b/src/ansiblelint/rules/UsingBareVariablesIsDeprecatedRule.py @@ -26,7 +26,7 @@ class UsingBareVariablesIsDeprecatedRule(AnsibleLintRule): - id = '104' + id = 'deprecated-bare-vars' shortdesc = 'Using bare variables is deprecated' description = ( 'Using bare variables is deprecated. Update your ' @@ -34,7 +34,7 @@ class UsingBareVariablesIsDeprecatedRule(AnsibleLintRule): 'syntax ``{{ your_variable }}``' ) severity = 'VERY_HIGH' - tags = ['deprecations', 'formatting'] + tags = ['deprecations'] version_added = 'historic' _jinja = re.compile(r"{{.*}}", re.DOTALL) diff --git a/src/ansiblelint/rules/VariableHasSpacesRule.py b/src/ansiblelint/rules/VariableHasSpacesRule.py index 1f15da07409..a822d5109cd 100644 --- a/src/ansiblelint/rules/VariableHasSpacesRule.py +++ b/src/ansiblelint/rules/VariableHasSpacesRule.py @@ -10,7 +10,7 @@ class VariableHasSpacesRule(AnsibleLintRule): - id = '206' + id = 'var-spacing' base_msg = 'Variables should have spaces before and after: ' shortdesc = base_msg + ' {{ var_name }}' description = 'Variables should have spaces before and after: ``{{ var_name }}``' diff --git a/src/ansiblelint/rules/YamllintRule.py b/src/ansiblelint/rules/YamllintRule.py index 0d076d5fa8c..31f1138aa9c 100644 --- a/src/ansiblelint/rules/YamllintRule.py +++ b/src/ansiblelint/rules/YamllintRule.py @@ -42,11 +42,11 @@ class YamllintRule(AnsibleLintRule): - id = 'YAML' + id = 'yaml' shortdesc = 'Violations reported by yamllint' description = DESCRIPTION severity = 'VERY_LOW' - tags = ['formatting', 'experimental', 'yamllint'] + tags = ['formatting', 'yamllint'] version_added = 'v5.0.0' config = None if "yamllint.config" in sys.modules: