Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better style guide checking (properly parse bash vs regex-hit-and-miss) #84

Open
mstreuhofer opened this issue Dec 21, 2016 · 8 comments

Comments

@mstreuhofer
Copy link
Collaborator

See discussion in PR #81

@mstreuhofer
Copy link
Collaborator Author

what about shfmt (https://github.com/mvdan/sh) ?
it seems to be opinionated as in there is no way to influence the acceptable style but at least it is readily available in homebrew

@kvz
Copy link
Owner

kvz commented Apr 3, 2017

Looks promising at first glance, have you ran it against any code?

@mstreuhofer
Copy link
Collaborator Author

yes. strangely it wants to change all if [[ $var = "x" ]] to if [[ $var == "x" ]]. Other than that it just removes some empty lines.

@kenden
Copy link

kenden commented Oct 18, 2017

Shellcheck could be nice too https://github.com/koalaman/shellcheck

@zbeekman
Copy link
Collaborator

@kenden we already use shellcheck. This is about style beyond linting/syntax checking 😉

@kvz
Copy link
Owner

kvz commented May 16, 2018

A complete Bash parser in JavaScript transpiled from Go https://www.npmjs.com/package/mvdan-sh #hackernews

@kvz
Copy link
Owner

kvz commented May 16, 2018

also found this yesterday, just sharing as it might interest you https://google.github.io/styleguide/shell.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants