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

Add opt-in rule to check whether FQCN is used for builtins #1614

Merged
merged 5 commits into from
Jun 9, 2021

Conversation

StopMotionCuber
Copy link
Contributor

As I have written in #1587, we currently have a regression for our custom rule that checks whether FQCNs are used everywhere.
As @ssbarnea suggested there, I added this rule upstream and made it opt-in. To not break current pipelines, it is by default turned off in the CI. I needed to change the rule_runner fixture, such that this rule is ran for the rule_runner nevertheless (this also seems like the more sensible default to me, as you include a specific rule there and expect it to be run).

This is my first contribution to this project, so feedback is welcome

Copy link
Contributor

@tadeboro tadeboro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the rule (for the playbooks I help maintain, we use FQCNs in all tasks). But this rule should definitely be disabled by default because as far as I know, there is no plan to deprecate bare name usage.

I did add a few nitpicks, but apart from that, the rule looks good to me.

src/ansiblelint/rules/FQCNBuiltinsRule.py Outdated Show resolved Hide resolved
src/ansiblelint/rules/FQCNBuiltinsRule.py Outdated Show resolved Hide resolved
@StopMotionCuber
Copy link
Contributor Author

Thanks for your review @tadeboro, I adapted the code to include your comments

Co-authored-by: Felix Fontein <felix@fontein.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants