Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profiles: include all rules when listing all rules or tags #3043

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/ansiblelint/rules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,9 @@ def __init__(
self.register(rule, conditional=conditional)
self.rules = sorted(self.rules)

# when we have a profile we unload some of the rules
if profile_name:
# When we have a profile we unload some of the rules
# But we do include all rules when listing all rules or tags
if profile_name and not (self.options.list_rules or self.options.list_tags):
filter_rules_with_profile(self.rules, profile_name)

def register(self, obj: AnsibleLintRule, conditional: bool = False) -> None:
Expand Down