Skip to main content
https://img.shields.io/pypi/v/glob_linters.svg Documentation Status Build and publish

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.

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.1](https://github.com/bowentan/glob-linters/compare/v0.3.0…v0.3.1) (2022-12-02)

### Bug Fixes

### Miscellaneous

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

### Features

### Bug Fixes

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

### Bug Fixes

### Miscellaneous

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

### Bug Fixes

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

### Miscellaneous Chores

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

### Miscellaneous Chores

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

### Bug Fixes

### Miscellaneous Chores

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

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

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

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

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

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

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

### Miscellaneous Chores

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

### Miscellaneous Chores

### Continuous Integration

Metadata

Release files for glob-linters 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glob-linters 0.3.1
File Size Uploaded
glob-linters-0.3.1.tar.gz 52.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for glob-linters 0.3.1
File Interpreter ABI Platform
glob_linters-0.3.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 66.0 kB

Release files / glob-linters-0.3.1.tar.gz

Download URL glob-linters-0.3.1.tar.gz
Size 52.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b6d13122876e74aa63f70976ea1afb44b1cdf94985efa53261c948c4b9fe0c6a
BLAKE2b-256 checksum
How to use checksums
f38d386e4f1e0f30ee5cecf0569da52a5fb68e740bae46e1df2a8afdcf9b2c2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release files / glob_linters-0.3.1-py2.py3-none-any.whl

Download URL glob_linters-0.3.1-py2.py3-none-any.whl
Size 14.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
978589d6dbbe834034dc9ca4fa0e3a5066bf908e971be3c696972cc6fa0ca6d5
BLAKE2b-256 checksum
How to use checksums
6ace40a3420f8a849927582e763c73a55822ca4809798fde3cfea4408f6525c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page