Skip to content

Commit

Permalink
Moved to flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
danilotat authored Apr 4, 2024
1 parent c25b643 commit 526acbf
Showing 1 changed file with 29 additions and 6 deletions.
35 changes: 29 additions & 6 deletions .github/workflows/superlinter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,32 @@ jobs:
with:
fetch-depth: 0

- name: Lint Code Base
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: true
VALIDATE_PYTHON_BLACK: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 black
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Format with Black
run: |
black .
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git diff --quiet && git diff --staged --quiet || (git add . ; git commit -m "Black formatting")
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 526acbf

Please sign in to comment.