<commit_before>Git-Lint
========

.. image:: https://badge.fury.io/py/git-lint.svg
    :target: http://badge.fury.io/py/git-lint

.. image:: https://travis-ci.org/sk-/git-lint.svg?branch=master
    :target: https://travis-ci.org/sk-/git-lint

.. image:: https://coveralls.io/repos/sk-/git-lint/badge.svg?branch=master
    :target: https://coveralls.io/r/sk-/git-lint?branch=master

Git-lint is a tool for improving source code one step at a time.

Motivation
----------

Often times enforcing coding styles to an existing project can be a nightmare.
Some reasons may include:

* the codebase is already a mess and the output of the tools is overwhelming.
* developers don't feel confident changing lines they do not own.
* or they just don't know what tool to use.

Features
--------

This tool tackles all the 3 problems mentioned above by providing just a single
tool that lints all the modified files. For each filetype it may use even more
than one linter or tool. Furthermore by default it only report problems of lines
that were added or modified.

Current linters:

- CSS

  * `Csslint <https://github.com/stubbornella/csslint>`_

- SCSS

  * `scss-lint <https://github.com/causes/scss-lint>`_

- Python

  * `Pylint <http://www.pylint.org/>`_
  * `PEP8 <https://pypi.python.org/pypi/pep8/1.4.6>`_

- PHP

  * `Php Code Sniffer <http://pear.php.net/package/PHP_CodeSniffer/>`_

- Javascript

  * `Jshint <http://www.jshint.com/>`_
  * `Gjslint <https://developers.google.com/closure/utilities/>`_

- JPEG

  * Custom via `Jpegtran <http://manpages.ubuntu.com/manpages/raring/man1/jpegtran.1.html>`_

- PNG

  * Custom via `Pngcrush <http://manpages.ubuntu.com/manpages/raring/man1/pngcrush.1.html>`_
  * Custom via `Optipng <http://manpages.ubuntu.com/manpages/raring/man1/optipng.1.html>`_

- RST

  * Via `rst2html.py (docutils) <http://docs.python.org/2/library/json.html>`_

- JSON

  * Via python `json.tool module <http://docs.python.org/2/library/json.html>`_

- YAML

  * Custom via `PyYAML <http://pyyaml.org/>`_

- INI

  * Custom via `ConfigParser module <http://docs.python.org/2/library/configparser.html>`_

- HTML

  * `HTML-Linter <https://github.com/deezer/html-linter>`_
  * `Tidy <https://w3c.github.io/tidy-html5/>`_ with preprocessing from `template-remover <https://github.com/deezer/html-linter>`_

- Ruby

  * `ruby-lint <https://github.com/yorickpeterse/ruby-lint>`_
  * `rubocop <https://github.com/bbatsov/rubocop>`_

- Java

  * `PMD <http://pmd.sourceforge.net/>`_ (it requires to put the script run.sh in your PATH)
  * `Checkstyle <http://checkstyle.sourceforge.net/>`

- Coffeescript
<commit_msg>Fixed Checkstyle link<commit_after>Git-Lint
========

.. image:: https://badge.fury.io/py/git-lint.svg
    :target: http://badge.fury.io/py/git-lint

.. image:: https://travis-ci.org/sk-/git-lint.svg?branch=master
    :target: https://travis-ci.org/sk-/git-lint

.. image:: https://coveralls.io/repos/sk-/git-lint/badge.svg?branch=master
    :target: https://coveralls.io/r/sk-/git-lint?branch=master

Git-lint is a tool for improving source code one step at a time.

Motivation
----------

Often times enforcing coding styles to an existing project can be a nightmare.
Some reasons may include:

* the codebase is already a mess and the output of the tools is overwhelming.
* developers don't feel confident changing lines they do not own.
* or they just don't know what tool to use.

Features
--------

This tool tackles all the 3 problems mentioned above by providing just a single
tool that lints all the modified files. For each filetype it may use even more
than one linter or tool. Furthermore by default it only report problems of lines
that were added or modified.

Current linters:

- CSS

  * `Csslint <https://github.com/stubbornella/csslint>`_

- SCSS

  * `scss-lint <https://github.com/causes/scss-lint>`_

- Python

  * `Pylint <http://www.pylint.org/>`_
  * `PEP8 <https://pypi.python.org/pypi/pep8/1.4.6>`_

- PHP

  * `Php Code Sniffer <http://pear.php.net/package/PHP_CodeSniffer/>`_

- Javascript

  * `Jshint <http://www.jshint.com/>`_
  * `Gjslint <https://developers.google.com/closure/utilities/>`_

- JPEG

  * Custom via `Jpegtran <http://manpages.ubuntu.com/manpages/raring/man1/jpegtran.1.html>`_

- PNG

  * Custom via `Pngcrush <http://manpages.ubuntu.com/manpages/raring/man1/pngcrush.1.html>`_
  * Custom via `Optipng <http://manpages.ubuntu.com/manpages/raring/man1/optipng.1.html>`_

- RST

  * Via `rst2html.py (docutils) <http://docs.python.org/2/library/json.html>`_

- JSON

  * Via python `json.tool module <http://docs.python.org/2/library/json.html>`_

- YAML

  * Custom via `PyYAML <http://pyyaml.org/>`_

- INI

  * Custom via `ConfigParser module <http://docs.python.org/2/library/configparser.html>`_

- HTML

  * `HTML-Linter <https://github.com/deezer/html-linter>`_
  * `Tidy <https://w3c.github.io/tidy-html5/>`_ with preprocessing from `template-remover <https://github.com/deezer/html-linter>`_

- Ruby

  * `ruby-lint <https://github.com/yorickpeterse/ruby-lint>`_
  * `rubocop <https://github.com/bbatsov/rubocop>`_

- Java

  * `PMD <http://pmd.sourceforge.net/>`_ (it requires to put the script run.sh in your PATH)
  * `Checkstyle <http://checkstyle.sourceforge.net/>`_

- Coffeescript

{'fraction_non_alphanumeric': 0.15874218602007956, 'fraction_numerical': 0.006819473385110817, 'mean_word_length': 3.396336386344713, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 28, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5720833', 'n_tokens_mistral': 2031, 'n_tokens_neox': 1912, 'n_words': 434}