Does anyone know of a Bash linter for the Google shell style guide? I have been using shellcheck as my linter with flycheck but it doesn't conform to this standard.
Asked
Active
Viewed 1,179 times
1
-
Is this question about the linter itself, or `flycheck`? If the former, it's not really an Emacs question, and we should migrate the post to a sister site. – Dan Apr 14 '17 at 21:04
-
I'm asking if anyone knows of something that specifically will work in Emacs - I used flycheck as an example for the package I use to handle linting but if another package would handle it that is fine too. – Andrew Apr 14 '17 at 21:31
-
Maybe it is better to ask the question in other place, since it is about Shell, not Emacs. – xuchunyang Feb 04 '18 at 05:06
1 Answers
2
You can use shfmt to format shell/bash code. It is configurable, so you should be able to get the Google style with something like shfmt -i 2 -ci
.
It's a standalone tool, but it should be easy enough to integrate with editors and IDEs. There are plugins for vim, atom, and vscode already.

mvdan
- 121
- 2