1

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.

  • 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 4 '18 at 5:06
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.