Codestyle checker
This script checks and auto fixes codestyle for all supported languages:
PHP (phpcs)
Python (flake8)
Javascript (jscs and jshint)
CSS (csscomb)
HTML (htmlcs)
Installation
# First install the pip, npm and pear package managers # Example for debian sudo apt-get install python-pip npm php-pear # Install codestyle and dependencies pip install codestyle npm install -g jshint jscs-fixer csscomb htmlcs walk brace-expansion pear install PHP_CodeSniffer
Usage
usage: codestyle [-h] [-I] [-i] [-c] [-s standard-dir] [-l language name]
[-e glob pattern [glob pattern ...]]
target [target ...]
Check and fix a code style
positional arguments:
target files for a checking
optional arguments:
-h, --help show this help message and exit
-i, --fix auto fix codestyle errors if possible
-c, --compact Show a compact output
-s standard-dir, --standard standard-dir
A path to a coding standard directory
-l language name, --language language name
force set the language for a checking
-x glob pattern [glob pattern ...], --exclude glob pattern [glob pattern ...]
Exclude paths/files from checking
Example
# check all supported files in directory recursive codestyle /path/to/project/dir # check set of files codestyle test.js test.php test.py # test directory with exclude rules codestyle /path -x '*.html' './tests/excluded_dir' # check file and try to fix errors codestyle -i test.js # check project with compact output (no detail errors information) codestyle -c /path/to/project/dir # check all project and save full report to file codestyle /path/to/project &> report.txt
Dependencies
phpcs
phpcbf
jshint (NodeJS)
jscs-fixer (NodeJS)
jscs (NodeJS)
flake8
csscomb (NodeJS)
htmlcs >= 0.1.4 (NodeJS)
walk (NodeJS)
brace-expansion (NodeJS)
Usage from the docker container
Also you can use the docker container with all installed dependencies.
Metadata
Release files for codestyle 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| codestyle-0.4.3.tar.gz | 31.1 kB | Without provenance | Details for codestyle-0.4.3.tar.gz |
Release files / codestyle-0.4.3.tar.gz
| Download URL | codestyle-0.4.3.tar.gz |
|---|---|
| Size | 31.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc5f89a248198b3e4df37e6ebba9546080fb12caca5918f329faab4e1fa323cc
|
|
BLAKE2b-256 checksum How to use checksums |
39b61a18e4cd099dce562f7053f19d31068f11dbac945fa285ad43e5ffdbe47b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for codestyle 0.4.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.