Skip to content

Commit

Permalink
docs: change rst to md for CHANGELOG
Browse files Browse the repository at this point in the history
Signed-off-by: Bowen Tan <bowentan78@gmail.com>
  • Loading branch information
bowentan committed Oct 13, 2022
1 parent 397c367 commit 5639a29
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 156 deletions.
12 changes: 0 additions & 12 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,10 @@ values =
search = glob-linters=={current_version}
replace = glob-linters=={new_version}

[bumpversion:file:action.yml]
search = v{current_version}
replace = v{new_version}

[bumpversion:file:Dockerfile]
search = GLOB_LINTERS_VERSION {current_version}
replace = GLOB_LINTERS_VERSION {new_version}

[bumpversion:file:docs/readme.rst]
search = v{current_version}
replace = v{new_version}

[bumpversion:file:README.rst]
search = v{current_version}
replace = v{new_version}

[bumpversion:file:setup.py]
search = version="{current_version}"
replace = version="{new_version}"
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ contents:
fetch-depth: 0
- name: Linting
uses: bowentan/glob-linters@v0.1.0-rc.13
uses: bowentan/glob-linters@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ author: "bowentan"
description: "Glob linters for linting multiple languages"
runs:
using: docker
image: "docker://ghcr.io/bowentan/glob-linters:v0.1.0-rc.13"
image: "docker://ghcr.io/bowentan/glob-linters:v0"
143 changes: 1 addition & 142 deletions docs/readme.rst
Original file line number Diff line number Diff line change
@@ -1,142 +1 @@
============
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

.. image:: https://github.com/bowentan/glob-linters/actions/workflows/build-publish.yml/badge.svg
:target: https://github.com/bowentan/glob-linters/actions/workflows/build-publish.yml
:alt: 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.


* 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 :command:`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 :doc:`/usage` for more advanced usages.

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

To use glob-linters in GitHub action, create a workflow file such as
:file:`.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.1.0-rc.13
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
You can control the workflow by creating a configuration file named as
:file:`.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 :file:`.py` files to be the
root of your repository.

For more details about usage, please refer to :doc:`/usage`.

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

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

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
.. include:: ../README.rst

0 comments on commit 5639a29

Please sign in to comment.