Extendable codestyle checker and fixer
Project description
This script checks and auto fixes codestyle for all supported languages:
PHP (phpcs)
Python (flake8)
Javascript (jscs and jshint)
CSS (csscomb)
HTML (htmlcs) - without in place fix support
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] [-ff] [-c] [-s standard-dir] [-l language name] target [target ...] Check and fix code style positional arguments: target files for checking optional arguments: -h, --help show this help message and exit -i, --try-fix auto fix codestyle errors -I --fix-only fix possible errors without extra checking -c, --compact Show compact output -s standard-dir, --standard standard-dir path to the coding standard directory -l language name, --language language name force set language for check
Example
# check all supported files in directory recursive codestyle /path/to/project/dir # check set of files codestyle test.js test.php test.py # 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 (global nodejs package)
jscs-fixer (global nodejs package)
jscs (global nodejs package)
flake8
csscomb (NodeJS)
htmlcs (NodeJS)
walk (NodeJS)
brace-expansion (NodeJS)
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
codestyle-0.0.23.tar.gz
(24.4 kB
view details)
File details
Details for the file codestyle-0.0.23.tar.gz
.
File metadata
- Download URL: codestyle-0.0.23.tar.gz
- Upload date:
- Size: 24.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15e7b7adb841dd5c51f134b70c80c6b6a096a37629bf934b30de58d867a036c0 |
|
MD5 | a34bca35e03a363be4e7c6d7f177b59e |
|
BLAKE2b-256 | 7eb0824ed7e8ef039ad67da6e0d8ff6ad9eb8a0e19c9cece33696a502f8b0bff |