You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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! 🙏
The text was updated successfully, but these errors were encountered:
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
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! 🙏
The text was updated successfully, but these errors were encountered: