Metadata-Version: 2.1
Name: glob-linters
Version: 0.2.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.2.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]
        target_dir = .
        target_suffix = .py

        [executable]
        cpplint = cpplint
        clang_format = clang-format
        pylint = pylint
        flake8 = flake8
        black = black
        isort = isort

        [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.

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

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