Bug 452400 - Kate can not use the -x switch of Shellcheck
Summary: Kate can not use the -x switch of Shellcheck
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 21.08.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-08 12:58 UTC by Ganton
Modified: 2022-05-05 18:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ganton 2022-04-08 12:58:27 UTC
Dear Kate developers,

Currently, there is no way in Kate to use the -x switch of Shellcheck. That switch is needed in a lot of cases. 

VS Code has a way, which is [described after a description about problems people have if they can not use -x](https://unix.stackexchange.com/questions/534688/vs-code-editor-how-to-include-x-switch-for-shellcheck).
Comment 1 Ganton 2022-04-08 12:59:15 UTC
For example: a form could be added to choose Shellcheck arguments, or in the "shellcheck.cpp" file (https://invent.kde.org/utilities/kate/-/blob/master/addons/project/tools/shellcheck.cpp can be seen) the line
    _args << QStringLiteral("--format=gcc");
could be replaced by
    _args << QStringLiteral("-x") << QStringLiteral("--format=gcc");
and enjoy the "-x" features. Other ways can be thought about.

And thanks for Kate!
Comment 2 Christoph Cullmann 2022-04-09 15:49:27 UTC
Hmm, the docs of shellcheck tell me you can just enable that in the default shellcheck config file globally:

This option may also be enabled using external-sources=true in .shellcheckrc.  This flag takes precedence.
Comment 3 Christoph Cullmann 2022-05-05 18:17:09 UTC
Hi, I think it would make more sense if you just alter the default in .shellcheckrc