shellharden
shellcheck-repl
shellharden | shellcheck-repl | |
---|---|---|
16 | 4 | |
4,556 | 15 | |
- | - | |
5.0 | 3.5 | |
about 1 month ago | 10 days ago | |
Rust | Shell | |
Mozilla Public License 2.0 | ISC License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
shellharden
-
Shellcheck finds bugs in your shell scripts
Everytime I see Shellcheck coming up, I have to mention shellharden[0] written by a colleague of mine. It is basically shellcheck but it applies the suggested changes automatically.
0: https://github.com/anordal/shellharden
-
similar to shellcheck?
Also worth mentioning shellharden
-
Bash Pitfalls
See also:
* https://www.shellcheck.net/ — linting tool to avoid common mistakes and improve your script
* Bash Practices: https://mywiki.wooledge.org/BashGuide/Practices
* Bash Pitfalls: https://mywiki.wooledge.org/BashPitfalls
* safe ways to do things in bash: https://github.com/anordal/shellharden/blob/master/how_to_do...
* better scripting: https://robertmuth.blogspot.in/2012/08/better-bash-scripting...
* robust scripting: https://www.davidpashley.com/articles/writing-robust-shell-s...
-
Code formatter, linters, etc. Recommendations?
There is shellcheck, and shellharden which is a strict version of it. There are similar stuff here, some that also help with your editor. You can also use a docker version of shfmt. See here for a quick tutorial on shfmt.
-
What is best Method of Submitting Bash Script, short Python ignorance confession (lament.)
Regarding linters, there are several of them in most languages.For bash, there is Shellcheck or a more strict (and sometimes confusing) Shellharden to do exactly what you want.
-
Awesome Rewrite It In Rust - A curated list of replacements for existing software written in Rust
For example, shellharden looks awesome.
- anordal/shellharden Safe ways to do things in bash
- How to do things safely in Bash
- How to do things safely in Bash (2018)
shellcheck-repl
-
Shell Script Best Practices, from a decade of scripting things
> "Use shellcheck."
(Disclaimer: I'm one of the authors)
After falling in love with ShellCheck several years ago, with the help of another person, I made the ShellCheck REPL tool for Bash:
https://github.com/HenrikBengtsson/shellcheck-repl>
-
Bash Pitfalls
Thank you, and thanks for the suggestion. Yes, it should be possible to keep the SC2154 check. I probably just disabled it as a quick fix when first started out. I'm tracking this in https://github.com/HenrikBengtsson/shellcheck-repl/issues/15.
> You'd also want to take into account special variables like $RANDOM and $HOSTNAME, but that's pretty trivial.
It seems like ShellCheck is already aware of these special Bash variable, e.g. 'echo $RANDOM' will not trigger SC2154 (or even SC2086 that otherwise asks you to quote variables).
-
ShellCheck: A static analysis tool for shell scripts
shellcheck-repl: Validation of Shell Commands Before Evaluation
https://github.com/HenrikBengtsson/shellcheck-repl
This tool validates your commands at the Bash prompt using ShellCheck and refuses to evaluate them if there's a mistake. It ignores a set of rules that doesn't play well with oneliners.
(Disclaimer: I'm one of the authors)
What are some alternatives?
ShellCheck - ShellCheck, a static analysis tool for shell scripts
bats-core - Bash Automated Testing System
shfmt - Dockernized shfmt. This formats shell script.
pure-bash-bible - 📖 A collection of pure bash alternatives to external processes.
shfmt - A shell formatter (sh/bash/mksh)
azure-policy - Repository for Azure Resource Policy built-in definitions and samples
isort - A Python utility / library to sort imports.
sh - A shell parser, formatter, and interpreter with bash support; includes shfmt
dmenu-scripts - Serious fun with dmenu
rust_cmd_lib - Common rust command-line macros and utilities, to write shell-script like tasks in a clean, natural and rusty way
static-analysis - ⚙️ A curated list of static analysis (SAST) tools and linters for all programming languages, config files, build tools, and more. The focus is on tools which improve code quality.