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

Difference between short and long argument, and argument usage consistency (From HN). #1

Open
2 tasks
a-t-0 opened this issue Feb 20, 2022 · 1 comment

Comments

@a-t-0
Copy link
Member

a-t-0 commented Feb 20, 2022

This is the first issue parsed from a related Hacker News post.

2 things https://github.com/nickjj would love to see in a checker would be:

Note, the requester is aware it's technically not possible to give a definitive answer here because supporting spaces vs equals comes down to the CLI tool itself. However, one can pick up when you mix the 2 styles and leave it up to the script author to pick a style and stick with it when possible.

@nickjj
Copy link

nickjj commented Feb 20, 2022

Thanks for moving this over. I know the first one would be tricky to implement too. Not all tools support both styles.

Maybe in both cases this checker could evaluate these patterns on a per command basis? This way it doesn't need to know anything about the tool itself, only the style you've picked is consistent for that command and if there's an edge case where a tool supports long flags but for some reason doesn't have one for a specific flag there would be a way to ignore that flag similar to how you can ignore specific ShellCheck rules -- in this case this checker could let you ignore just that 1 flag.

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

No branches or pull requests

2 participants