Extendable codestyle checker and fixer
Project description
# Codestyle checker
This script checks and auto fixes codestyle for all supported languages:
1. PHP (phpcs)
2. Python (pep8 and pylint)
3. Javascript (jscs and jshint)
4. CSS (csscomb)
## 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
pear install PHP_CodeSniffer
```
## Usage
```
usage: codestyle [-h] [-i] [-c] [-s standard-dir] 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
-c, --compact Show compact output
-s standard-dir, --standard standard-dir
Path to the coding standard directory
```
## 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 --try-fix test.js
# check project with compact output (no detail errors information)
codestyle --compact /path/to/project/dir
# check all project and save full report to file
codestyle /path/to/project &> report.txt
```
## Dependencies
1. phpcs
2. phpcbf
3. jshint (global nodejs package)
4. jscs-fixer (global nodejs package)
5. jscs (global nodejs package)
7. pep8
8. autopep8
9. pylint
10. csscomb
This script checks and auto fixes codestyle for all supported languages:
1. PHP (phpcs)
2. Python (pep8 and pylint)
3. Javascript (jscs and jshint)
4. CSS (csscomb)
## 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
pear install PHP_CodeSniffer
```
## Usage
```
usage: codestyle [-h] [-i] [-c] [-s standard-dir] 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
-c, --compact Show compact output
-s standard-dir, --standard standard-dir
Path to the coding standard directory
```
## 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 --try-fix test.js
# check project with compact output (no detail errors information)
codestyle --compact /path/to/project/dir
# check all project and save full report to file
codestyle /path/to/project &> report.txt
```
## Dependencies
1. phpcs
2. phpcbf
3. jshint (global nodejs package)
4. jscs-fixer (global nodejs package)
5. jscs (global nodejs package)
7. pep8
8. autopep8
9. pylint
10. csscomb
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.11.tar.gz
(22.8 kB
view details)
File details
Details for the file codestyle-0.0.11.tar.gz
.
File metadata
- Download URL: codestyle-0.0.11.tar.gz
- Upload date:
- Size: 22.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9435c71627f9887577b12e26aec00c383ab51da63991dd538633832cdd79b061 |
|
MD5 | efa23a379f90fd93f1424781f970794a |
|
BLAKE2b-256 | 710ee47d042bcf61256b08c1578b2deb801ad93643662bbe0a0fbbc4491f2b12 |