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

AvoidUsingPositionalParameter: Check if command has parameters to avoid having az in default CommandAllowList #1850

Conversation

bergmeister
Copy link
Collaborator

@bergmeister bergmeister commented Oct 24, 2022

PR Summary

This is an enhancement to CommandAllowList introduced in #1846
To avoid having az as the default in it, return now the discovered command and inspect whether it has parameters. If not, which is the case for the az CLI, then do not continue analyzing usage of that command.
Also, az has backed out their change since then so with latest version of az, we don't need it as default allow-list anyway.

PR Checklist

@bergmeister bergmeister marked this pull request as ready for review October 25, 2022 16:43
@JamesWTruher
Copy link
Member

@bergmeister should we have any validation for this new behavior? Not about removing "az", but rather the command having no parameters

Copy link
Member

@JamesWTruher JamesWTruher left a comment

Choose a reason for hiding this comment

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

just 1 question

Rules/AvoidPositionalParameters.cs Outdated Show resolved Hide resolved
@bergmeister bergmeister enabled auto-merge (squash) February 12, 2024 18:10
Copy link
Member

@JamesWTruher JamesWTruher left a comment

Choose a reason for hiding this comment

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

this is fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants