thinking today about how much I love Shellcheck's explainer pages for its linter failures https://www.shellcheck.net/wiki/SC2173

every page has:

- problematic code
- correct code
- rationale
- exceptions

ShellCheck: SC2173 – SIGKILL/SIGSTOP can not be trapped.

@b0rk Shellcheck's only flaw is not knowing about zsh.
@b0rk Never seen this before - so cool.

@b0rk reminds me of that classic format for giving feedback: stop/start/continue.

Stop: things you currently do, but are better to avoid.

Start: missed opportunities, try to leverage them. New ideas.

Continue: the stuff you're doing now which is great, please keep going!

I always liked my managers who used this.

@b0rk yeah that's great!
I use a lot of Go and so https://staticcheck.dev/docs/checks/#SA1008 is a great page for me.
Checks

Explanations for all checks in Staticcheck

Staticcheck
@sszuecs wait this is so cool, how had I never heard of staticcheck!

@b0rk I built Regal on similar principles 🙂 https://github.com/StyraInc/regal

My inspiration was mostly Hadolint though. I guess there are a few doing this.

GitHub - StyraInc/regal: Regal is a linter and language server for Rego, bringing your policy development experience to the next level!

Regal is a linter and language server for Rego, bringing your policy development experience to the next level! - StyraInc/regal

GitHub
@b0rk shellcheck is such a nice tool! It made my day when I discovered it!
@b0rk coworkers think i am OCD when i talk shellcheck
@b0rk I didn't know about shellcheck, this is really cool!
@b0rk I learned more about writing code for Bash from installing Shellcheck than any tutorial or man page.

@b0rk semgrep’s playground is quite nice for that. Most rules have tests for matches and non-matches.

https://semgrep.dev/playground/r/bash.lang.best-practice.useless-cat.useless-cat

Semgrep

@b0rk @ellotheth it’s so good, I wish every linter had such high quality documentation.
@b0rk damn straight! Set up shellcheck with your $EDITOR and CI so that a) you know about issues before save and b) in PRs that others submit.
@b0rk Definitely one of the best linters out there!