Skip to main content

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)
4. 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
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 -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
------------

1. phpcs
2. phpcbf
3. jshint (global nodejs package)
4. jscs-fixer (global nodejs package)
5. jscs (global nodejs package)
6. pep8
7. autopep8
8. pylint
9. csscomb
10. htmlcs

Project details


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.14.tar.gz (23.4 kB view details)

Uploaded Source

File details

Details for the file codestyle-0.0.14.tar.gz.

File metadata

  • Download URL: codestyle-0.0.14.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for codestyle-0.0.14.tar.gz
Algorithm Hash digest
SHA256 6655bb1469a993e9270e6e123a5bced7146ca065b11ba1c4263c40530989f42c
MD5 1716813316130f58ffb0b94235ddf5a6
BLAKE2b-256 7c3c6131ebe77251c982551202457e8eaba867f0419ebcabf8ff5dec4ba2bc28

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page