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

Please update Shellcheck with a new output format to be used with modern AI IDE and Editors or CLI AI tools #3146

Open
Emasoft opened this issue Feb 12, 2025 · 0 comments

Comments

@Emasoft
Copy link

Emasoft commented Feb 12, 2025

PROBLEM: Currently Shellcheck cannot be used with modern AI IDE and Editors or CLI AI tools. The reason is that the text format of the output returns only 1 line of code, the one with the error or problem. Instead AI models need more context to understand and produce a fixed version of that line. For more context I mean at least 10 lines of code before, and 10 lines of code after the reported line number. Only looking at the line of code in its context the AI can identify it and fix it. With the current Shellcheck the text format output is limited to quote one line of code, and this cause all the AI to fail to fix even the simplest of bugs. Even closing a missing parenthesis become impossible. Since the linter is called after every change to the code by the AI, and since the AI cannot fix the errors reported by the linter, any tool or ide using the AI with shellcheck will either enter an infinite loop, or will end creating duplicated code (that will be even more difficult to fix).

SOLUTION: Add to Shellcheck a new output format, similar to text, but with the line put in context, with the display of 10 lines of code before and 10 lines of code after the line with the error.

THANK YOU! 🙏

@Emasoft Emasoft changed the title Please update Shellcheck to be used with modern AI IDE and Editors or CLI AI tools Please update Shellcheck with a new output format to be used with modern AI IDE and Editors or CLI AI tools Feb 12, 2025
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

1 participant