[Enhancement] Add markdown linter in pre-commit hook (#643)

* [Enhancement] Skip CI when some specific files were changed

* update precommit markdown lint

* circleci precommit hook
pull/655/head
Tong Gao 2021-12-08 15:36:47 +08:00 committed by GitHub
parent b1768d9653
commit e712352728
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -9,6 +9,9 @@ jobs:
- run:
name: Install pre-commit hook
command: |
sudo apt-add-repository ppa:brightbox/ruby-ng -y
sudo apt-get update
sudo apt-get install -y ruby2.7
pip install pre-commit
pre-commit install
- run:

View File

@ -13,6 +13,9 @@ jobs:
python-version: 3.7
- name: Install pre-commit hook
run: |
sudo apt-add-repository ppa:brightbox/ruby-ng -y
sudo apt-get update
sudo apt-get install -y ruby2.7
pip install pre-commit
pre-commit install
- name: Linting

View File

@ -33,6 +33,12 @@ repos:
args: ["--remove"]
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/markdownlint/markdownlint
rev: v0.11.0
hooks:
- id: markdownlint
args: ["-r", "~MD002,~MD013,~MD029,~MD033,~MD034",
"-t", "allow_different_nesting"]
- repo: https://github.com/myint/docformatter
rev: v1.3.1
hooks: