<commit_before>.. image:: https://cloud.githubusercontent.com/assets/7521600/15992701/ef245fd4-30ef-11e6-992d-275c5ca7c3a0.jpg

coala: Linting and fixing code for all languages
------------------------------------------------

**coala provides a unified command-line interface for linting and fixing all
your code, regardless of the programming languages you use.**

With coala, users can create
`rules and standards <http://coala.readthedocs.io/en/latest/Users/coafile.html>`__
to be followed in the source
code. coala has an **user-friendly interface** that is completely customizable.
It can be used in any environment and is completely modular.

coala has a set of official bears (plugins) for several languages, including
popular languages such as **C/C++**, **Python**, **JavaScript**, **CSS**,
**Java** and many more, in addition to some generic language independent
algorithms. To learn more about the different languages supported and the
bears themselves,
`click here. <https://github.com/coala/bear-docs/blob/master/README.rst>`__

To see what coala can do for your language, run:

.. code-block:: bash

    $ coala --show-bears --filter-by-language Python

|Linux Build Status| |Windows Build status| |Scrutinizer Code Quality|
|codecov.io| |Documentation Status| |Gitmate|

.. Start ignoring LineLengthBear

======================================= ================================================ ================================================= ====================================================== =========================================================
`Official Website <http://coala.io/>`__ `Documentation <https://coala.readthedocs.io>`__  `Twitter <https://twitter.com/coala_analyzer>`__ `Facebook <https://www.facebook.com/coalaAnalyzer/>`__ `Video Demo <https://asciinema.org/a/42968?autoplay=1>`__
======================================= ================================================ ================================================= ====================================================== =========================================================

.. Stop ignoring

-----

.. contents::
    :local:
    :depth: 1
    :backlinks: none

-----

========
Features
========

* Out-of-the-box support for various `popular languages <https://github.com/coala/bear-docs/blob/master/README.rst>`__,
  such as **C/C++**, **Python**, **Javascript**, **CSS**, **Java** and many
  others with built-in check routines.
* User-friendly interfaces such as JSON, interactive CLI or any custom format.
* Plugins for
  `gedit <https://github.com/coala/coala-gedit>`__,
  `Sublime Text <https://github.com/coala/coala-sublime>`__,
  `Atom <https://github.com/coala/coala-atom>`__,
  `Vim <https://github.com/coala/coala-vim>`__ and
  `Emacs <https://github.com/coala/coala-emacs>`__.
* Optimized performace with multi-threading to parallelize the routines - can
  complete a 26000 line python repository in less than 3 seconds.
* File caching support - run only on changed files.

-----

=============
Prerequisites
=============

* Python >= 3.4
* pip >= 8.0

-----

============
Installation
============

To install the **latest stable version** run:

.. code-block:: bash

    $ pip3 install coala

Make sure you have Python >= 3.4 and pip >= 8.1 installed as the installation
may not succeed with lower versions.

|Stable|

To install the latest development version run:

.. code-block:: bash

    $ pip3 install coala --pre

The latest code from the master branch is automatically deployed as the
development version in PyPI.

To also install all bears for coala at once run:

.. code-block:: bash

    $ pip3 install coala-bears

You can also use ``cib`` (coala Installs Bears), which is an experimental bear
manager that lets you install, upgrade, uninstall, check dependencies, etc.
for bears. To install it, run:

.. code-block:: bash

    $ pip3 install cib

For usage instructions, consult
`this link <http://coala.readthedocs.io/en/latest/Developers/Bear_Installation_Tool.html>`__.

|PyPI| |Windows| |Linux|

-----

=====
Usage
=====

There are two options to run coala:

* using a ``.coafile``, a project specific configuration file that will store
  all your settings for coala
* using command-line arguments

Using a ``.coafile``
********************

A sample ``.coafile`` will look something like this:

.. code-block:: bash

    [Spacing]
    files = src/**/*.py
    bears = SpaceConsistencyBear
    use_spaces = True

* The ``files`` key tells coala which files to lint - here we're linting all
  python files inside the ``src/`` directory by using a glob expression.
* The ``bears`` key specifies which bears (plugins) you want to use. We support
  a huge number of languages and you can find the whole list
  `here <https://github.com/coala/bear-docs/blob/master/README.rst>`__.
  If you don't find your langauge there, we've got some
  `bears that work for all languages <https://github.com/coala/bear-docs/blob/master/README.rst#all>`__. Or you can file an issue and we would create a bear for you!
* ``use_spaces`` enforces spaces over tabs in the codebase. ``use_spaces`` is a
  setting for the ``SpaceConsistencyBear``.

``[Spacing]`` is a *section*. Sections are executed in the order you<commit_msg>README.rst: Fix typo "langauge" -> "language"<commit_after>.. image:: https://cloud.githubusercontent.com/assets/7521600/15992701/ef245fd4-30ef-11e6-992d-275c5ca7c3a0.jpg

coala: Linting and fixing code for all languages
------------------------------------------------

**coala provides a unified command-line interface for linting and fixing all
your code, regardless of the programming languages you use.**

With coala, users can create
`rules and standards <http://coala.readthedocs.io/en/latest/Users/coafile.html>`__
to be followed in the source
code. coala has an **user-friendly interface** that is completely customizable.
It can be used in any environment and is completely modular.

coala has a set of official bears (plugins) for several languages, including
popular languages such as **C/C++**, **Python**, **JavaScript**, **CSS**,
**Java** and many more, in addition to some generic language independent
algorithms. To learn more about the different languages supported and the
bears themselves,
`click here. <https://github.com/coala/bear-docs/blob/master/README.rst>`__

To see what coala can do for your language, run:

.. code-block:: bash

    $ coala --show-bears --filter-by-language Python

|Linux Build Status| |Windows Build status| |Scrutinizer Code Quality|
|codecov.io| |Documentation Status| |Gitmate|

.. Start ignoring LineLengthBear

======================================= ================================================ ================================================= ====================================================== =========================================================
`Official Website <http://coala.io/>`__ `Documentation <https://coala.readthedocs.io>`__  `Twitter <https://twitter.com/coala_analyzer>`__ `Facebook <https://www.facebook.com/coalaAnalyzer/>`__ `Video Demo <https://asciinema.org/a/42968?autoplay=1>`__
======================================= ================================================ ================================================= ====================================================== =========================================================

.. Stop ignoring

-----

.. contents::
    :local:
    :depth: 1
    :backlinks: none

-----

========
Features
========

* Out-of-the-box support for various `popular languages <https://github.com/coala/bear-docs/blob/master/README.rst>`__,
  such as **C/C++**, **Python**, **Javascript**, **CSS**, **Java** and many
  others with built-in check routines.
* User-friendly interfaces such as JSON, interactive CLI or any custom format.
* Plugins for
  `gedit <https://github.com/coala/coala-gedit>`__,
  `Sublime Text <https://github.com/coala/coala-sublime>`__,
  `Atom <https://github.com/coala/coala-atom>`__,
  `Vim <https://github.com/coala/coala-vim>`__ and
  `Emacs <https://github.com/coala/coala-emacs>`__.
* Optimized performace with multi-threading to parallelize the routines - can
  complete a 26000 line python repository in less than 3 seconds.
* File caching support - run only on changed files.

-----

=============
Prerequisites
=============

* Python >= 3.4
* pip >= 8.0

-----

============
Installation
============

To install the **latest stable version** run:

.. code-block:: bash

    $ pip3 install coala

Make sure you have Python >= 3.4 and pip >= 8.1 installed as the installation
may not succeed with lower versions.

|Stable|

To install the latest development version run:

.. code-block:: bash

    $ pip3 install coala --pre

The latest code from the master branch is automatically deployed as the
development version in PyPI.

To also install all bears for coala at once run:

.. code-block:: bash

    $ pip3 install coala-bears

You can also use ``cib`` (coala Installs Bears), which is an experimental bear
manager that lets you install, upgrade, uninstall, check dependencies, etc.
for bears. To install it, run:

.. code-block:: bash

    $ pip3 install cib

For usage instructions, consult
`this link <http://coala.readthedocs.io/en/latest/Developers/Bear_Installation_Tool.html>`__.

|PyPI| |Windows| |Linux|

-----

=====
Usage
=====

There are two options to run coala:

* using a ``.coafile``, a project specific configuration file that will store
  all your settings for coala
* using command-line arguments

Using a ``.coafile``
********************

A sample ``.coafile`` will look something like this:

.. code-block:: bash

    [Spacing]
    files = src/**/*.py
    bears = SpaceConsistencyBear
    use_spaces = True

* The ``files`` key tells coala which files to lint - here we're linting all
  python files inside the ``src/`` directory by using a glob expression.
* The ``bears`` key specifies which bears (plugins) you want to use. We support
  a huge number of languages and you can find the whole list
  `here <https://github.com/coala/bear-docs/blob/master/README.rst>`__.
  If you don't find your language there, we've got some
  `bears that work for all languages <https://github.com/coala/bear-docs/blob/master/README.rst#all>`__. Or you can file an issue and we would create a bear for you!
* ``use_spaces`` enforces spaces over tabs in the codebase. ``use_spaces`` is a
  setting for the ``SpaceConsistencyBear``.

``[Spacing]`` is a *section*. Sections are executed in the order you
{'fraction_non_alphanumeric': 0.22607040913415793, 'fraction_numerical': 0.011227402473834443, 'mean_word_length': 4.281909547738693, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 44, 'https://': 28, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5055727', 'n_tokens_mistral': 3146, 'n_tokens_neox': 2900, 'n_words': 1047}