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.

3
  • 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
    Commented Apr 14, 2017 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
    Commented Apr 14, 2017 at 21:31
  • Maybe it is better to ask the question in other place, since it is about Shell, not Emacs.
    – xuchunyang
    Commented Feb 4, 2018 at 5:06

1 Answer 1

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 and acknowledge you have read our privacy policy.

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