Metadata-Version: 2.1
Name: glob-linters
Version: 0.3.1
Summary: Integrated tool for multi-language linters for command line tooland GitHub action
Home-page: https://github.com/bowentan/glob-linters
Author: Bowen Tan
Author-email: bowentan78@gmail.com
License: MIT license
Keywords: glob-linters
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.6
Description-Content-Type: text/x-rst
License-File: LICENSE
License-File: AUTHORS.rst

============
glob-linters
============


.. image:: https://img.shields.io/pypi/v/glob_linters.svg
        :target: https://pypi.python.org/pypi/glob_linters

.. image:: https://readthedocs.org/projects/glob-linters/badge/?version=latest
        :target: https://glob-linters.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status

..
  x-release-please-start-version
.. image:: https://github.com/bowentan/glob-linters/actions/workflows/build-publish.yml/badge.svg?branch=v0.3.1
        :target: https://github.com/bowentan/glob-linters/actions/workflows/build-publish.yml
        :alt: Build and publish
..
  x-release-please-end


glob-linters is an integtated tool to lint multiple programming and scripting languages
and can be used as a normal command line in terminals as well as a workflow in GtiHub
actions.

* Free software: MIT license
* Documentation: https://glob-linters.readthedocs.io/.


Features
--------

* Linting multiple languages.
* Fully supporting configuration for each linter via configuration files or command
  options

Supported linters
~~~~~~~~~~~~~~~~~

+----------+----------------+------------------------------------+
| Language | File extension | Linters                            |
+----------+----------------+------------------------------------+
| c++      | .cpp           | cpplint, clang-format              |
+----------+----------------+------------------------------------+
| Python   | .py            | pylint, black, flake8, isort, mypy |
+----------+----------------+------------------------------------+

Quick start
-----------

You can use glob-linters as a command line tool in a terminal or a workflow in GitHub
action. Choose the appropriate one as a quick start.

Command line
~~~~~~~~~~~~

To use as a command line tool, install the latest package by ``pip`` using the
following command:

.. code-block:: console

        $ pip install glob-linters

After successful installation, you can use glob-linters as a command tool by issuing the
following to see the command line options.

.. code-block:: console

        $ glob_linters -h

Then run :code:`glob_linters` to lint all supported languages in the *current directory*,
which will scan all corresponding files recursively and then perform linting. If you
want to lint particular files, please visit the documentation for more advanced usages.

GitHub action
~~~~~~~~~~~~~

To use glob-linters in GitHub action, create a workflow file such as
``.github/workflows/glob-linters.yml`` in your own repository with the example
contents:

.. code-block:: yaml

        name: Code linting

        on:
          push:
            branches: ["main"]
          pull_request:
            branches: ["main"]

        jobs:
          glob-linters:
            runs-on: ubuntu-latest
            steps:
              - name: Checkout code
                uses: actions/checkout@v3
                with:
                  fetch-depth: 0

              - name: Linting
                uses: bowentan/glob-linters@v0
                env:
                  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

To use a specific version, replace ``v0``.

You can control the workflow by creating a configuration file named as
``.github/glob-linters.ini`` and a sample configuration is given below:

.. code-block:: ini

        [target]
        dirs = .
        suffixes = .py

        [.py]
        enabled_linters = pylint black isort

        [.py:pylint]
        executable = pylint
        config_file = .github/linter-configs/.pylintrc

        [.py:black]
        executable = black
        config_file = .github/linter-configs/.black

        [env]
        debug = True

This configuration will enable ``debug`` mode with additional information when running
and set the directory that will be searched for linting ``.py`` files to be the
root of your repository, using only ``pylint``, ``black`` and ``isort``.

For more details about usage, please refer to the documentation usage.

Contributing
------------

If you are interested in this project and would like to make some contributions, please
refer to the contributing_ for the contributing guide.

.. _contributing: https://github.com/bowentan/glob-linters/blob/main/CONTRIBUTING.rst

Credits
-------

This package was created with Cookiecutter_ and
the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


# Changelog

## [0.3.1](https://github.com/bowentan/glob-linters/compare/v0.3.0...v0.3.1) (2022-12-02)


### Bug Fixes

* add extension error loggings for mypy ([88280f1](https://github.com/bowentan/glob-linters/commit/88280f10ed9b1eacb3fd19326a5c562e9885628f))


### Miscellaneous

* **deps-dev:** bump tox from 3.26.0 to 3.27.1 ([#105](https://github.com/bowentan/glob-linters/issues/105)) ([de0791f](https://github.com/bowentan/glob-linters/commit/de0791f70cc01c00599148eed4b870f0825ddb43))
* **deps-dev:** bump twine from 4.0.1 to 4.0.2 ([#106](https://github.com/bowentan/glob-linters/issues/106)) ([d813fa8](https://github.com/bowentan/glob-linters/commit/d813fa86a8151f7d1d5ae08b9d71421077c85c62))
* **deps:** bump actions/setup-python from 3 to 4 ([#98](https://github.com/bowentan/glob-linters/issues/98)) ([92817e0](https://github.com/bowentan/glob-linters/commit/92817e0a6338b0970987e61616adc83f7c179ba5))
* **deps:** bump black from 22.8.0 to 22.10.0 ([#107](https://github.com/bowentan/glob-linters/issues/107)) ([63ba577](https://github.com/bowentan/glob-linters/commit/63ba577e6144a94284a7c00a5382442fe76afafb))
* **deps:** bump docker/build-push-action from 2.5.0 to 3.2.0 ([#99](https://github.com/bowentan/glob-linters/issues/99)) ([059134e](https://github.com/bowentan/glob-linters/commit/059134ee4fed632d207bf6ab1ab471fbe4be5bab))
* **deps:** bump docker/login-action from 1.10.0 to 2.1.0 ([#102](https://github.com/bowentan/glob-linters/issues/102)) ([42fe5c8](https://github.com/bowentan/glob-linters/commit/42fe5c8d822543e42f4941fe6ebec34153000be0))
* **deps:** bump docker/metadata-action from 3.3.0 to 4.1.1 ([#104](https://github.com/bowentan/glob-linters/issues/104)) ([acbfd60](https://github.com/bowentan/glob-linters/commit/acbfd60a470912cdffdae19a3ef0501432ce63ce))
* **deps:** bump mypy from 0.971 to 0.991 ([#103](https://github.com/bowentan/glob-linters/issues/103)) ([2a8437f](https://github.com/bowentan/glob-linters/commit/2a8437f3fcb4e5fcffb2ddfc501138eeb277c9ca))
* **deps:** bump pylint from 2.15.2 to 2.15.7 ([#100](https://github.com/bowentan/glob-linters/issues/100)) ([a13fb42](https://github.com/bowentan/glob-linters/commit/a13fb42096cce0f657f560a38dec0ccd4c4b9e37))
* **deps:** bump python from 3.10.7-slim to 3.11.0-slim ([#97](https://github.com/bowentan/glob-linters/issues/97)) ([7d366a2](https://github.com/bowentan/glob-linters/commit/7d366a262e660a93257ccd23ffb793c4d74efa02))
* **release-please:** add changelog-type ([#110](https://github.com/bowentan/glob-linters/issues/110)) ([56558f7](https://github.com/bowentan/glob-linters/commit/56558f7c91c6ad2944e3c89f2653c96455cd6e98))
* **testpypi:** add condition ([#108](https://github.com/bowentan/glob-linters/issues/108)) ([e9d2e47](https://github.com/bowentan/glob-linters/commit/e9d2e47ac5b7b6f83ee3055344878929267413dc))
* **testpypi:** change `if` position ([#109](https://github.com/bowentan/glob-linters/issues/109)) ([88eb324](https://github.com/bowentan/glob-linters/commit/88eb3243ea64fb38f79df1d52bdf0902a9505954))

## [0.3.0](https://github.com/bowentan/glob-linters/compare/v0.2.2...v0.3.0) (2022-11-02)


### Features

* add some small tests ([#90](https://github.com/bowentan/glob-linters/issues/90)) ([d5dfa14](https://github.com/bowentan/glob-linters/commit/d5dfa14c2a86431e0754390ae1004753107ef487))


### Bug Fixes

* [BUG] `debug` mode cannot disabled [#86](https://github.com/bowentan/glob-linters/issues/86) ([#87](https://github.com/bowentan/glob-linters/issues/87)) ([99c2bfa](https://github.com/bowentan/glob-linters/commit/99c2bfa814547c85354080b2d9455b1a8c2e4540))

## [0.2.2](https://github.com/bowentan/glob-linters/compare/v0.2.1...v0.2.2) (2022-10-15)


### Bug Fixes

* `__init__.py` was not updated ([#80](https://github.com/bowentan/glob-linters/issues/80)) ([7eb1ec2](https://github.com/bowentan/glob-linters/commit/7eb1ec203fd4b95e7f901fefa1abb07a6feb63a1))


### Miscellaneous

* add `changelog-types` ([#83](https://github.com/bowentan/glob-linters/issues/83)) ([b77d714](https://github.com/bowentan/glob-linters/commit/b77d714c2bc1b322ce62788105bea9c7874aace2))
* remove bump2version config ([#82](https://github.com/bowentan/glob-linters/issues/82)) ([aa80747](https://github.com/bowentan/glob-linters/commit/aa80747aff60a7b37d2430ae49bc06e00d5d96f6))

## [0.2.1](https://github.com/bowentan/glob-linters/compare/v0.2.0...v0.2.1) (2022-10-15)


### Bug Fixes

* version bump bug test ([#78](https://github.com/bowentan/glob-linters/issues/78)) ([6809d80](https://github.com/bowentan/glob-linters/commit/6809d80af5097da6d0fefa9cd7af2530e27b7ba8))

## [0.2.0](https://github.com/bowentan/glob-linters/compare/v0.1.1...v0.2.0) (2022-10-15)


### Miscellaneous Chores

* release 0.2.0 ([#76](https://github.com/bowentan/glob-linters/issues/76)) ([9710ab0](https://github.com/bowentan/glob-linters/commit/9710ab0521c757da24676dbc521522e3611ec5a3))

## [0.1.1](https://github.com/bowentan/glob-linters/compare/v0.1.0...v0.1.1) (2022-10-15)


### Miscellaneous Chores

* release 0.1.1 ([#74](https://github.com/bowentan/glob-linters/issues/74)) ([e6d7918](https://github.com/bowentan/glob-linters/commit/e6d7918336b8e54b4a9284164584393bcf9aaae0))

## [0.1.0](https://github.com/bowentan/glob-linters/compare/v0.1.0-rc.27...v0.1.0) (2022-10-15)


### Bug Fixes

* add a fix commit ([#73](https://github.com/bowentan/glob-linters/issues/73)) ([4ccd4da](https://github.com/bowentan/glob-linters/commit/4ccd4da34d210603c5a3cd03a8111ac724345e34))


### Miscellaneous Chores

* finalize-0.1.0-branch-1 ([#70](https://github.com/bowentan/glob-linters/issues/70)) ([994a782](https://github.com/bowentan/glob-linters/commit/994a78277df6212b9737fa608a2c59cd6bf0397e))
* manual release ([bc2f7b2](https://github.com/bowentan/glob-linters/commit/bc2f7b2f5377c28c1d2de268f4205d109dfaaa55))

## [0.1.0-rc.27](https://github.com/bowentan/glob-linters/compare/v0.1.0-rc.26...v0.1.0-rc.27) (2022-10-13)


### Miscellaneous Chores

* release 0.1.0-rc.26 → 0.1.0-rc.27 ([0645f5c](https://github.com/bowentan/glob-linters/commit/0645f5cc92a1a70a70cb7d39c0db82f7cc7ebb64))

## [0.1.0-rc.26](https://github.com/bowentan/glob-linters/compare/v0.1.0-rc.25...v0.1.0-rc.26) (2022-10-13)


### Miscellaneous Chores

* release 0.1.0-rc.25 → 0.1.0-rc.26 ([58ded36](https://github.com/bowentan/glob-linters/commit/58ded361c6ec129b00fc04173612549bbb7576fe))

## [0.1.0-rc.25](https://github.com/bowentan/glob-linters/compare/v0.1.0-rc.24...v0.1.0-rc.25) (2022-10-13)


### Miscellaneous Chores

* release 0.1.0-rc.25 ([9993965](https://github.com/bowentan/glob-linters/commit/999396556893dc4b3908cab7103bb9eb110e81be))

## [0.1.0-rc.24](https://github.com/bowentan/glob-linters/compare/v0.1.0-rc.23...v0.1.0-rc.24) (2022-10-13)


### Miscellaneous Chores

* release 0.1.0-rc.24 ([891ced8](https://github.com/bowentan/glob-linters/commit/891ced8e6d131069392268f19e981d795c554bfc))

## [0.1.0-rc.23](https://github.com/bowentan/glob-linters/compare/v0.1.0-rc.20...v0.1.0-rc.23) (2022-10-13)


### Miscellaneous Chores

* release 0.1.0-rc.21 ([a36303c](https://github.com/bowentan/glob-linters/commit/a36303c916f64dfbabd0c0a446b58cf6a5757c78))
* release 0.1.0-rc.22 ([3bb4dc5](https://github.com/bowentan/glob-linters/commit/3bb4dc5d64f9d0f57f5a383168eeaa6b56e1a236))
* release 0.1.0-rc.23 ([2ed65ca](https://github.com/bowentan/glob-linters/commit/2ed65ca59e92ce4d07ca2cdab203ea1b6253ec56))
* release 0.1.0-rc.23 ([9f88787](https://github.com/bowentan/glob-linters/commit/9f88787921e61f418fe1adff077fe4014a10db8d))

## [0.1.0-rc.20](https://github.com/bowentan/glob-linters/compare/v0.1.0-rc.16...v0.1.0-rc.20) (2022-10-13)


### Miscellaneous Chores

* release 0.1.0-a.1 ([8eefe96](https://github.com/bowentan/glob-linters/commit/8eefe96577bc4fac546389d39fe801c348124566))
* release 0.1.0-rc.15 ([9a5ef05](https://github.com/bowentan/glob-linters/commit/9a5ef05f26c51332d49557fd03d07267e5b1902f))
* release 0.1.0-rc.16+1 ([4b083aa](https://github.com/bowentan/glob-linters/commit/4b083aab8e872bbe5b27298e0c6eb801a0b9ac26))
* release 0.1.0-rc.17 ([3fe45d3](https://github.com/bowentan/glob-linters/commit/3fe45d37b1a678df23d6efd756a739e812f7afac))
* release 0.1.0-rc.17 ([412e61f](https://github.com/bowentan/glob-linters/commit/412e61f8457a9a303ce74d23d2dad5b2e8ad6003))
* release 0.1.0-rc.18 ([9a4d586](https://github.com/bowentan/glob-linters/commit/9a4d586cf9282a90174c91c95489842651aa47e9))
* release 0.1.0-rc.18 ([242d374](https://github.com/bowentan/glob-linters/commit/242d37404567157df84d22d60dc0b2e1ecb85df6))
* release 0.1.0-rc.18 ([cd7d700](https://github.com/bowentan/glob-linters/commit/cd7d700958f833e010cdccdc211990073d184f2f))
* release 0.1.0-rc.19 ([4077547](https://github.com/bowentan/glob-linters/commit/407754780f7756ce05cf051d92250e5ebde1adbd))
* release 0.1.0-rc.20 ([e992f3c](https://github.com/bowentan/glob-linters/commit/e992f3c43d59c66fc85ba0b45b0bd9064adfc6b9))

## [0.1.0-rc.16](https://github.com/bowentan/glob-linters/compare/v0.1.0-rc.14...v0.1.0-rc.16) (2022-10-13)


### Continuous Integration

* change release type to `published` ([8976824](https://github.com/bowentan/glob-linters/commit/89768245990625e414f2d3773865a02ce8611653))
* separate workflows ([3a5ff64](https://github.com/bowentan/glob-linters/commit/3a5ff64dea7614053f8c9509abec6cb0d4333b5a))


### Miscellaneous Chores

* release 0.1.0-rc.14 ([54639c7](https://github.com/bowentan/glob-linters/commit/54639c701c5022b8540adad164a72eaad7584d57))
* release 0.1.0-rc.15 ([767b341](https://github.com/bowentan/glob-linters/commit/767b341fd6aa020c86c28a1009230a12f6883708))
* release 0.1.0-rc.16 ([108e7e0](https://github.com/bowentan/glob-linters/commit/108e7e02815e6824334dcb2868e977a678a5f411))

## [0.1.0-rc.14](https://github.com/bowentan/glob-linters/compare/v0.1.0-rc.13...v0.1.0-rc.14) (2022-10-13)

### Documentation

-   change rst to md for CHANGELOG ([5639a29](https://github.com/bowentan/glob-linters/commit/5639a291ce7724cce54dbd19924eba32a5b785bd))

### Miscellaneous Chores

-   release 0.1.0-rc.14 ([54639c7](https://github.com/bowentan/glob-linters/commit/54639c701c5022b8540adad164a72eaad7584d57))

### Continuous Integration

-   separate workflows ([3a5ff64](https://github.com/bowentan/glob-linters/commit/3a5ff64dea7614053f8c9509abec6cb0d4333b5a))
