-
Notifications
You must be signed in to change notification settings - Fork 132
Code actions to disable shellcheck rules for lines or entire files #933
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
Comments
+1 for this idea 💡 @polyzen i’m not sure what editor you use, but as a stopgap, i’ve written a little neovim lua command to insert a shellcheck disable statement based on the current line’s lsp diagnostics into your buffer: xero/dotfiles@f3821be#diff-cf8a96b3f61615a85a1fb4313e82a75b58d6e0bd71869e9c3b1ead9d1bbd91ab hope this helps for now. |
@xero I think I found a better solution for neovim: #999 (comment) |
Hello there! I have made a first draft to try to address this issue:
I wanted to get some inputs before continuing.
As for enhancement, this patch would open the possibility of adding a disabling of the rule at the scope level (function/if/while...) which does not exist in nvimtools/none-ls.nvim. Also, tell me if you want a Pull Request in order to start a proper review. Hope this will help! |
Implements bash-lsp#933. Always add a code action to disable a given diagnostic for a given line or for the whole file. This patch handles: * indentation * existing directive. It also sorts the disable directives if any * multi-line command Add corresponding tests. Signed-off-by: Thomas Faivre <[email protected]>
Implements bash-lsp#933. Always add a code action to disable a given diagnostic for a given line or for the whole file. This patch handles: * indentation * existing directive. It also sorts the disable directives if any * multi-line command Add corresponding tests. Signed-off-by: Thomas Faivre <[email protected]>
What is the problem this feature will solve?
Currently it seems there are only code actions to apply fixes when available. Code actions to disable the rules (using comments) would also be appreciated.
#490 (comment)
What is the feature you are proposing to solve the problem?
Additional code actions, eg. null-ls offers:
What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: