Skip to content
Snippets Groups Projects
Commit a66bc175 authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Add pylint to pre commit and Github Action

parent ade94fb8
No related branches found
No related tags found
2 merge requests!131WIP: Fix linting,!125Update CI config
...@@ -26,10 +26,10 @@ jobs: ...@@ -26,10 +26,10 @@ jobs:
#options: "--check --diff" #options: "--check --diff"
#src: "." #src: "."
version: "22.3.0" version: "22.3.0"
- name: Install flake8 - name: Install tools
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install flake8 pip install flake8 pylint
#if [ -f requirements.txt ]; then pip install -r requirements.txt; fi #if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8 - name: Lint with flake8
run: | run: |
...@@ -38,3 +38,6 @@ jobs: ...@@ -38,3 +38,6 @@ jobs:
flake8 . flake8 .
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
#flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics #flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Lint with pylint
run: |
pylint app *.py
...@@ -13,3 +13,7 @@ repos: ...@@ -13,3 +13,7 @@ repos:
rev: 4.0.1 rev: 4.0.1
hooks: hooks:
- id: flake8 - id: flake8
- repo: https://github.com/PyCQA/pylint
rev: v2.13.8
hooks:
- id: pylint
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment