mcandre / toys

code demos for newbies
https://github.com/mcandre/toys
30 stars 6 forks source link

warnings for classic traps in zsh scripts #349

Open mcandre opened 1 year ago

mcandre commented 1 year ago

Search for, propose, and examine implementing a linter rule for classic traps in zsh scripts, as classic POSIX traps have a nasty habit of resetting in assorted shell script contexts.

mcandre commented 7 months ago

If ShellCheck can't do it, then there may not be a reliable way to do it ourselves without implementing a POSIX sh + bash + zsh triple AST parsing linter ourselves. That's a lot of work, times three.