-
Notifications
You must be signed in to change notification settings - Fork 7
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 a way how to disable a rule on granular basis #15
Comments
Hi @milancermak, thanks for the suggestion! This is certainly something we could easily add per file. |
Hi @milancermak |
I'm guessing you mean PR #18 Looks great! ❤️ for the So I would have to use |
Yes, correct! I decided to do it this way and not the other way around (requiring a flag to view all results) because I didn't want to change the default behavior of the tool. Let me know your opinion on this choice. |
It's confusing. I think it mainly stems from the name. I understand "disable inline" as "do NOT take the inline comments into account" / " disregard the Also, I would prefer not to have to use a flag to enable the inline comments, i.e. by default, they should be used unless requested otherwise. Comments in source file are more long-lasting, so to speak, as cmdline args - when adding the So actually, if the |
Bumping this issue because having granularity (ideally on a file / namespace / function / line) would be very welcomed :) I come from the Rust (🦀) world and I'm so used to |
It would be awesome if there was a way how to disable a rule (or multiple at the same time) on a per line, per function and per file basis. Probably something like an inline comment as is common with other tools.
For example, if I'd want to disable arithmetic checks (the
arithmetic-expr_add
rule), I would put a# amarna-disable: arithmetic-expr_add
either at the top of the file (to disable this check in the whole file), as the first comment in the function body (to disable it only in that function) or somewhere inside the function (to disable it on the next line).Are you thinking about adding something like this?
The text was updated successfully, but these errors were encountered: