I just updated my current project to use both #shellcheck and #shfmt (yes, I am writing a lot of bash at the moment).
Writing #bash like a grown-up feels weird.
But a good weird!
I just updated my current project to use both #shellcheck and #shfmt (yes, I am writing a lot of bash at the moment).
Writing #bash like a grown-up feels weird.
But a good weird!
Have submitted v3 of this #Linux bridge #multicast related patchset now: https://patchwork.kernel.org/project/netdevbpf/cover/[email protected]/
I'm still confused why #shellcheck throws these errors even though the tests seem to execute fine otherwise: https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/
Also no idea what netdev/check_selftest wants from me yet.
The most useless shellcheck warning is SC2001.
Занимаясь скриптоложеством и запуская в очередной раз #shellcheck, подумалось, что надо бы прикрутить его к quickfix'у.
Уже строя планы на модуль с особо извращенной^Wизощренной, само-собой, логикой, парсером и еще чего-нибудь, чего там начинает топтаться в мозгах после полуночи.
Открыл справку по quickfix'у, открыл ман по shellcheck'у...
Вторым абзацем в [FORMATS](https://github.com/koalaman/shellcheck/blob/master/shellcheck.1.md#user-content-formats):
> For example, in Vim, `:set makeprg=shellcheck\ -f\ gcc\ %` will allow
> using `:make` to check the script, and `:cnext` to jump to the next error.
> <file>:<line>:<column>: <type>: <message>
...
Ну, ладь..., всмысле -- ок. Не очень-то и хотелось.
Добавил в ftplugin строчку и ~~сижу скучаю~~ рад.
#TIL that #DuckDuckGo has a pretty clean submission page for suggestion new !bang search shortcuts.
Feeling so lazy today, I just submitted one for #shellcheck wiki error message(https://www.shellcheck.net/wiki/) searches(e.g. "!shck SC2067").
@christian_freiherr_von_wolff Just encourage people to include #ShellCheck in their build/test pipelines or IDE's and it will flag this problem as an error... and probably many others 😉
ShellCheck, a static analysis tool for shell scripts https://github.com/koalaman/shellcheck?tab=readme-ov-file#miscellaneous
The xdg-utils now have a Gitlab CI scaffold to test for regressions automatically.
For that to fully work though the scripts need to fully pass shellcheck in the first place, help here is appreciated!
#NixOS has made me like
#bash. I use it so frequently with pkgs.writeShellApplication and have accepted to use its non-POSIX "advanced" features like (associative) arrays, the [[ ]] conditional syntax, the variable string mangling magic, etc. I absolutely love how writeShellApplication automatically runs everything through #shellCheck and makes it easy to set runtimeInputs and runtimeEnv. I'd love for it to pass the result through #shfmt though 😉Your periodic reminder that Shellcheck is awesome and should be used everywhere...