ShellCheck
stan
Our great sponsors
ShellCheck | stan | |
---|---|---|
288 | 3 | |
28,829 | 469 | |
- | 1.7% | |
7.8 | 5.7 | |
6 days ago | about 1 month ago | |
Haskell | Haskell | |
GNU General Public License v3.0 or later | Mozilla Public License 2.0 |
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.
ShellCheck
-
For Loop against multiple directories.
Your for loop is missing the do keyword, example: for i in 1 2; do echo $i; done. You can use https://www.shellcheck.net/ to check your shell script.
-
How would i go converting this while loop into a for loop ?
So in conclusion, your code snippet isn't convertible into a for loop in a good, semantic way. Keep it as while loop. Also bonus tip, check the sidebar for resources such as ShellCheck to check your code for subtle mistakes
-
Variables in Bash Script
ShellCheck warns about this and other common problems
-
Can't figure out how to accept user input to break out of while loop
This, plus [shellcheck](https://www.shellcheck.net/) or something similar should help you figure out most problems a LOT faster.
-
I can't for the life of me figure out the weird syntax!
shellcheck is quite nice to check your syntax for mistakes, even ones that don't usually cause issues but perhaps on files with spaces in their names, etc.
-
i was watching a tutorial of learning bash but came across this error. can anyone help?
Final suggestion, run your script through https://www.shellcheck.net/ to get suggestions on improvements.
-
Choosing an improved terminal/shell and need help
A tool like shellcheck can help quite a bit in navigating bash requirements: https://github.com/koalaman/shellcheck I'd suggest using Zsh interactively (w/ syntax highlighting, autocompletion, easy to use hook functions, etc.); & stick to bash with shellcheck analysis for scripting generally.
-
AWK return/print as nested array in Bash
So you probably want two nested while loops as you count down or up the array. These examples should fix you up. I recommend the vanilla POSIX while example, and install the command-line version of shellcheck to lint your code as you go along.
-
Why does this command always output "bar"
Note, also: https://github.com/koalaman/shellcheck/wiki/SC2015
- My code isnβt working as expected, would like some help
stan
-
Comparing strict and lazy
That sounds very interesting. Maybe it would not be very hard to implement a prototype of such a system with Stan?
-
Introducing Haskell in Soisy
Would you be okay if we add Soisy to the list of companies using stan?
-
Hsthrift: Open-sourcing Thrift for Haskell - Facebook Engineering
However, I'm a huge fan of static tools like this in general. I've heard great things about https://package.elm-lang.org/packages/jfmengels/elm-review/latest/ and I need to try out https://github.com/kowainik/stan. Also its possible HLint has ways to write more advanced rules and I just don't know about them, but even if that's so hopefully I've explained why just dropping it in isn't a huge win.
What are some alternatives?
bash-language-server - A language server for Bash
efm-langserver - General purpose Language Server
PowerShell - PowerShell for every system!
shfmt - Dockernized shfmt. This formats shell script.
neomake - Asynchronous linting and make framework for Neovim/Vim
sh - A shell parser, formatter, and interpreter with bash support; includes shfmt
ohmyzsh - π A delightful community-driven (with 2,000+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
proot - An chroot-like implementation using ptrace.
shellharden - The corrective bash syntax highlighter
babashka - Native, fast starting Clojure interpreter for scripting
maam - A monadic approach to static analysis following the methodology of AAM
hdocs - Haskell docs tool