Integrated tool for multi-language linters for command line tooland GitHub action
Project description
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:
$ 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.
$ glob_linters -h
Then run 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:
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:
[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.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
# Changelog
## [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))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file glob-linters-0.3.0.tar.gz
.
File metadata
- Download URL: glob-linters-0.3.0.tar.gz
- Upload date:
- Size: 49.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b874db46d32e2d5103da0e8d1821b3a682a7af068db5a33ff703dacc2a1d96b |
|
MD5 | 75dd3dc89deb409b4eb85b860308029e |
|
BLAKE2b-256 | e607a4bfe1b8db4a3ba6af526430175297367b5520d5f496c4f7c60efe0616c0 |
Provenance
File details
Details for the file glob_linters-0.3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: glob_linters-0.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66a76b18ef7537b95810ee1ce01e7e1c1c8c0677ed072fdf26b6dce32124486a |
|
MD5 | d4c8a591e57e595014a36bbf202af85e |
|
BLAKE2b-256 | e7fa7d91ecce0d162056900aa9ab6404858e2165cb02206971b907af41f53f2a |