Code style enforcement for bash programs.
Go to file
Mathew Odden 2dd066e13e Document E020 in README
This check was mysteriously missing from the README list.
We should probably doc it to let people know up front.

Change-Id: Iec6329b24c4aa88b97cf17e51b0b91ca2b2f58fa
2014-06-18 17:33:37 -05:00
bash8 Add tests and samples for legacy bash8 2014-05-27 17:13:44 -05:00
doc/source Merge "Doc: fix contributing and readme links" 2014-05-20 23:30:32 +00:00
.coveragerc Import fresh cookiecut bash8 project 2014-04-23 00:06:39 -05:00
.gitignore Import fresh cookiecut bash8 project 2014-04-23 00:06:39 -05:00
.gitreview Add .gitreview 2014-05-02 00:46:04 -05:00
.mailmap Import fresh cookiecut bash8 project 2014-04-23 00:06:39 -05:00
.testr.conf Import fresh cookiecut bash8 project 2014-04-23 00:06:39 -05:00
babel.cfg Import fresh cookiecut bash8 project 2014-04-23 00:06:39 -05:00
CONTRIBUTING.rst Import fresh cookiecut bash8 project 2014-04-23 00:06:39 -05:00
HACKING.rst Import fresh cookiecut bash8 project 2014-04-23 00:06:39 -05:00
LICENSE Import fresh cookiecut bash8 project 2014-04-23 00:06:39 -05:00
MANIFEST.in Import fresh cookiecut bash8 project 2014-04-23 00:06:39 -05:00
openstack-common.conf Import fresh cookiecut bash8 project 2014-04-23 00:06:39 -05:00
README.rst Document E020 in README 2014-06-18 17:33:37 -05:00
requirements.txt Add argparse requirement for py26 2014-05-13 22:47:39 -05:00
setup.cfg Add entry point for bash8 script 2014-04-23 00:16:25 -05:00
setup.py Fix PEP8 violations 2014-05-02 00:45:49 -05:00
test-requirements.txt Add tests and samples for legacy bash8 2014-05-27 17:13:44 -05:00
tox.ini Use venv to build documentation 2014-05-16 21:54:47 +02:00

bash8

A pep8 equivalent for bash scripts

This program attempts to be an automated style checker for bash scripts to fill the same part of code review that pep8 does in most OpenStack projects. It started from humble beginnings in the DevStack project, and will continue to evolve over time.

Currently Supported Checks

Errors

Basic white space errors, for consistent indenting

  • E001: check that lines do not end with trailing whitespace
  • E002: ensure that indents are only spaces, and not hard tabs
  • E003: ensure all indents are a multiple of 4 spaces
  • E004: file did not end with a newline

Structure Errors

A set of rules that help keep things consistent in control blocks. These are ignored on long lines that have a continuation, because unrolling that is kind of "interesting"

  • E010: do not on the same line as for
  • E011: then not on the same line as if
  • E012: heredoc didn't end before EOF
  • E020: Function declaration not in format ^function name {$