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

Add shell script style #612

Open
qinkunbao opened this issue Feb 4, 2022 · 2 comments
Open

Add shell script style #612

qinkunbao opened this issue Feb 4, 2022 · 2 comments

Comments

@qinkunbao
Copy link
Member

We should have a style guide for bash scripts.

As discussed in #609, environment variables and internal shell variables are capitalized. All other variable names should be lower case. Some shell scripts in the project don't follow this convection.

Here is an example:
https://google.github.io/styleguide/shellguide.html

In addition, we can add a shell scripts format checker to the build pipeline.

@mssun
Copy link
Member

mssun commented Feb 4, 2022

The shellcheck will be helpful for the issue: https://github.com/koalaman/shellcheck

@mssun
Copy link
Member

mssun commented Feb 8, 2022

Another useful tool shfmt: https://github.com/mvdan/sh

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

2 participants