-
Notifications
You must be signed in to change notification settings - Fork 643
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 optional rule that check for no-same-owner #1450
Conversation
d693b2c
to
250886e
Compare
8a494c5
to
12a4f9c
Compare
Add a new rule that identifies use of the same owner when transferring files between hosts as a violation. This rule is disabled by default and user needs to manually activate it inside the config as it is needed only for very particular use-cases. Reference: https://zuul-ci.org/docs/zuul-jobs/policy.html#preservation-of-owner-between-executor-and-remote
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the addition of opt-in rules. Can we get it mentioned in the docs?
We already do, because the .ansible-lint file from the root of the repository is included inside the docs at config, section. Basically we documented it by only mentioning it there, is sneaky but practical, look at https://ansible-lint.readthedocs.io/en/latest/configuring.html |
With PR ansible#1450 optional rules with the 'opt-in' tag were introduced and according to the docs, listing rules and tags with `-v` should also list the opt-in rules. Fixes: ansible#2068 Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
With PR ansible#1450 optional rules with the 'opt-in' tag were introduced and according to the docs, listing rules and tags with `-v` should also list the opt-in rules. Fixes: ansible#2068 Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
With PR ansible#1450 optional rules with the 'opt-in' tag were introduced and according to the docs, listing rules and tags with `-v` should also list the opt-in rules. Fixes: ansible#2068 Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
With PR ansible#1450 optional rules with the 'opt-in' tag were introduced and according to the docs, listing rules and tags should also list the opt-in rules. Fixes: ansible#2068 Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
With PR ansible#1450 optional rules with the 'opt-in' tag were introduced and according to the docs, listing rules and tags should also list the opt-in rules. Fixes: ansible#2068 Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
* Include opt-in rules when listing tags and rules With PR #1450 optional rules with the 'opt-in' tag were introduced and according to the docs, listing rules and tags should also list the opt-in rules. Fixes: #2068 Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at> * gracefully handle invalid format options with listing rules Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at> * put arguments -L and -T into a mutually exclusive group We either print a list of rules or a list of tags, but never both at the same time. So it makes no sense to allow giving both arguments at the same time. Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at> * always provide a long form of cli arguments Having short cli arguments for often used options is nice to have when using the command in an interactive shell. For writing scripts it would be better to have long forms of arguments as it increases the readebility. Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at> * Update tox.yml Co-authored-by: Sorin Sbarnea <sorin.sbarnea@gmail.com>
Add a new rule that identifies use of the same owner when transferring files between hosts as a violation.
This rule is disabled by default and user needs to manually activate it inside the config as it is needed only for very particular use-cases.
Adding this rule to the linter should make it much easier for others to reuse it if they seem fit and ease upgrades of the linter, as the custom rule no longer needs to be ported to newer version of the linter.
Reference: https://zuul-ci.org/docs/zuul-jobs/policy.html#preservation-of-owner-between-executor-and-remote