#shellcheck — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #shellcheck, aggregated by home.social.
-
@b0rk OMG -- your comic yesterday on #shellcheck! https://wizardzines.com/comics/shellcheck/
I hadn't heard of it, and just started using it. It's so helpful -- instead of puzzling out some weird behavior at runtime, it points me to things that are probably not what I mean.
Thanks so much for showing everyone this great tool.
-
@b0rk OMG -- your comic yesterday on #shellcheck! https://wizardzines.com/comics/shellcheck/
I hadn't heard of it, and just started using it. It's so helpful -- instead of puzzling out some weird behavior at runtime, it points me to things that are probably not what I mean.
Thanks so much for showing everyone this great tool.
-
ShellCheck: Ein Linter für Shell-Skripte
Der Einsatz von Werkzeugen zur Code-Überprüfung lohnt sich immer. Das gilt insbesondere, wenn ihr Code aus dem Internet herunterladet, eure Skripte von KI generieren lasst, oder diese selbst schreibt.
#Linter #ShellCheck #Skript #Linux
https://gnulinux.ch/shellcheck-ein-linter-fuer-shell-skripte
-
ShellCheck: Ein Linter für Shell-Skripte
Der Einsatz von Werkzeugen zur Code-Überprüfung lohnt sich immer. Das gilt insbesondere, wenn ihr Code aus dem Internet herunterladet, eure Skripte von KI generieren lasst, oder diese selbst schreibt.
#Linter #ShellCheck #Skript #Linux
https://gnulinux.ch/shellcheck-ein-linter-fuer-shell-skripte
-
Отладка bash-скриптов: инструменты, о которых мало кто
В предыдущей статье я рассказал, как писал скрипт мониторинга системы с нуля от идеи до рабочего инструмента с меню, цветным выводом и уведомлениями в Telegram. Там же выяснилось, что большинство проблем при написании bash-скриптов возникает не из-за сложной логики, а из-за незаметных ошибок: забытых токенов-заглушек, тихих падений через pipe, команд которые молча возвращают не то. Именно тогда я понял, что echo для отладкиэто каменный век. Скрипт мониторинга написан и работает. Теперь поговорим о том, что делать, когда он перестаёт работать или ведёт себя странно. Я собрал инструменты и приёмы, которые реально меняют то, как работать с bash. Не абстрактный список из документации, а вещи которые я использую сам и которые несколько раз спасали в ситуации «скрипт упал на проде, надо найти за пять минут». Для тех, кто спешит: быстрая шпаргалка
https://habr.com/ru/articles/1044660/
#bash #linux #отладка #shellcheck #bashdb #strace #set_x #devops #bash_scripting #отладка_скриптов
-
Github Actions: #Shellcheck schmeißt eine Fehlermeldung wegen veraltetem Nodejs. Jetzt anpassen! Sonst funktioniert im Herbst garnichts mehr.
https://gist.github.com/dewomser/d7cad9a9cd461d85ddd3cb6277f248f2 -
Github Actions: #Shellcheck schmeißt eine Fehlermeldung wegen veraltetem Nodejs. Jetzt anpassen! Sonst funktioniert im Herbst garnichts mehr.
https://gist.github.com/dewomser/d7cad9a9cd461d85ddd3cb6277f248f2 -
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!
-
Github Actions beschwert sich, dass #shellcheck noch node v.20 benutzt, gefordert ist 24
Deprecated und wird im September 26 abgeschaltet,
im yaml ersetzt
- uses: actions/checkout@v3
durch
- uses: bewuethr/shellcheck-action@v2Alles ist wieder gut.
https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ -
Github Actions beschwert sich, dass #shellcheck noch node v.20 benutzt, gefordert ist 24
Deprecated und wird im September 26 abgeschaltet,
im yaml ersetzt
- uses: actions/checkout@v3
durch
- uses: bewuethr/shellcheck-action@v2Alles ist wieder gut.
https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ -
#shellcheck befriedigt. Der Button ist wieder grün.
https://github.com/dewomser/Toot_music_is_playing -
#shellcheck befriedigt. Der Button ist wieder grün.
https://github.com/dewomser/Toot_music_is_playing -
Wenn man Code (Bash) bei Github findet und der sieht optisch sehr gut aus.
Einrückungen, Variablennanen, Doku usw. , trau dem nicht ! Dieser Code hatte sehr viele kaputte Zählschleifen.
#Shellcheck:
Modification of FAILED is local (...
FAILED was modified in a subshell...Ich hab die ganze überflüssige Zählerei gelöscht und so den Code saniert und um die Hälfte gekürzt.
My way, hacker's way funktioniert ! 😃 -
Wenn man Code (Bash) bei Github findet und der sieht optisch sehr gut aus.
Einrückungen, Variablennanen, Doku usw. , trau dem nicht ! Dieser Code hatte sehr viele kaputte Zählschleifen.
#Shellcheck:
Modification of FAILED is local (...
FAILED was modified in a subshell...Ich hab die ganze überflüssige Zählerei gelöscht und so den Code saniert und um die Hälfte gekürzt.
My way, hacker's way funktioniert ! 😃 -
-
Занимаясь скриптоложеством и запуская в очередной раз #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").
-
#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
-
@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
-
:nixos: #NixOS has made me like :bash: #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 😉
-
:nixos: #NixOS has made me like :bash: #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...
-
Your periodic reminder that Shellcheck is awesome and should be used everywhere...
-
Holy crap! That 50 line #ShellScript, which includes child process management and signal handling, not only works, but #shellcheck only whines about two things, both of which I know don't matter.
-
I'm using #shellcheck's excellent #haskell GitHub workflow to produce statically linked Haskell binaries. It's curious, however, that ghc-9.0.4 produces a binary that's roughly 1MiB in size, whereas 9.4 produces a whopping 30MiB binary. Haven't tested the later ghc versions yet, but I hope they're a bit more conservative w.r.t. size...
-
I'm using #shellcheck's excellent #haskell GitHub workflow to produce statically linked Haskell binaries. It's curious, however, that ghc-9.0.4 produces a binary that's roughly 1MiB in size, whereas 9.4 produces a whopping 30MiB binary. Haven't tested the later ghc versions yet, but I hope they're a bit more conservative w.r.t. size...
-
Ran #shellcheck on my thesis's #Bash part and it detected like 6 errors. Some were false positives, but one was an actual problem. I was saving the passed arguments and needed to save them and temporarily remove all of them so that a sourced script doesn't exec them and it turns out that arrays in Bash are even more cursed than I thought.
I don't think I'm ever going to write shell scripts without shellcheck. Honestly it should be installed by default on every non-minimal #Linux distro.edit: To clarify, the false positives were also things to be mindful of, specifically sourcing unknown command outputs, but it was search paths from guix, so it was fine in this very specific case.
-
Ran #shellcheck on my thesis's #Bash part and it detected like 6 errors. Some were false positives, but one was an actual problem. I was saving the passed arguments and needed to save them and temporarily remove all of them so that a sourced script doesn't exec them and it turns out that arrays in Bash are even more cursed than I thought.
I don't think I'm ever going to write shell scripts without shellcheck. Honestly it should be installed by default on every non-minimal #Linux distro. -
Me experimenting with build scripts for bash, using
- #shfmt - formatting
- #shellcheck - linting
- bats - unit testing
- #shelldoc - for google style docstrings
- source - library importing
- #bashlog - basic logging
- TODO: #bpkg - library packaging -
Me experimenting with build scripts for bash, using
- #shfmt - formatting
- #shellcheck - linting
- bats - unit testing
- #shelldoc - for google style docstrings
- source - library importing
- #bashlog - basic logging
- TODO: #bpkg - library packaging -
nix running #shellcheck automatically on my pkgs.writeShellApplication is just SO AWESOME! #nixpkgs #nix
-
nix running #shellcheck automatically on my pkgs.writeShellApplication is just SO AWESOME! #nixpkgs #nix
-
God I love #nix ... runs my poor bash skills automatically through #shellcheck so I don't break my own stuff.
❤️ 😍
-
God I love #nix ... runs my poor bash skills automatically through #shellcheck so I don't break my own stuff.
❤️ 😍
-
Personal advent, day 5: in which I write an ode to Shellcheck, which has been an invaluable tool in helping me gain confidence with Bash:
-
#ShellCheck (https://github.com/koalaman/shellcheck) is a fantastic and amazing tool that helps with this. It validates #shell scripts, and it catches all the common mistakes and home-made misunderstandings we have around using #Bash. This alone has improved my understanding of Bash and I now feel like I'm no longer hacking together Bash code.
1/
-
#shellcheck explanation sites are just a documentation how shitty #bash is.
-
"SC1009: The mentioned syntax error was in this simple command." - #Shellcheck so passiv-aggressiv vorwurfsvoll, ich krieg immer ein schlechtes Gewissen.
-
Use ShellCheck to find common shell scripting errors https://www.admin-magazine.com/News/Debug-Your-Shell-Scripts-with-ShellCheck #Shell #ShellCheck #scripting #OpenSource #FOSS #Linux #tools #utility
-
@zhenech well, yes, I do have #shellcheck wired in a bunch of builds, just not for all packages I'm touching today, from multiple machines, not all of them having proper editors/hooks/confs deployed. That's why I'm enjoying #lintian as the last line of defense before wasting time. 🙃