A pep8 equivalent for bash scripts
Project description
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.
The output format aims to follow pycodestyle (pep8) default output format.
Free software: Apache license
Documentation: https://docs.openstack.org/bashate
Release notes: https://docs.openstack.org/releasenotes/bashate/index.html
Contributing: https://docs.openstack.org/bashate/latest/contributor/index.html
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
E005: file does not begin with #! or have a .sh prefix
E006: check for lines longer than 79 columns
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 or elif
E012: heredoc didn’t end before EOF
E020: Function declaration not in format ^function name {$
Obsolete, deprecated or unsafe syntax
Rules to identify obsolete, deprecated or unsafe syntax that should not be used
E040: Syntax errors reported by bash -n
E041: Usage of $[ for arithmetic is deprecated for $((
E042: local declaration hides errors
E043: arithmetic compound has inconsistent return semantics
E044: Use [[ for =~,<,> comparisions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bashate-2.0.0.tar.gz
.
File metadata
- Download URL: bashate-2.0.0.tar.gz
- Upload date:
- Size: 29.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb990cf07c0ca09ee06f3b7eff79232a2d6eff9d2bdf141e8126efebb0521a17 |
|
MD5 | 8143df66c83808ab25a59319da236fb1 |
|
BLAKE2b-256 | 308187a64fd890fa416232abb219210a48afa040a4e85436c35c7eee077c0f45 |
File details
Details for the file bashate-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: bashate-2.0.0-py3-none-any.whl
- Upload date:
- Size: 27.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2af080811a277d6cd86e17d164964f83c239dbadd8cd5f13881995ebc6b92f1 |
|
MD5 | 687fb02c01a9f7ee04801c9b634834a1 |
|
BLAKE2b-256 | 1229f4d1cf78002c9134d94905ff405937199c94ce361cab4151b9308e0a07bc |