Skip to content

Commit

Permalink
Merge pull request #1655 from moodpulse/badlint
Browse files Browse the repository at this point in the history
badlint
  • Loading branch information
mikhailprivalov authored Mar 14, 2022
2 parents 7e8462f + 22628ee commit 8aa194e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Все обязательные проверки (с пометкой required) должны быть обязательно без ошибок.

При падении проверок Lint лучше локально запустить `black` на файлах из pull request.

Например `black results/forms/forms107.py`
22 changes: 22 additions & 0 deletions .github/workflows/black_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: black linter

on: [pull_request]

jobs:
black-lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Check out source repository
uses: actions/checkout@v2
- name: Set up Python environment
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: black Lint
uses: reviewdog/action-black@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
level: warning
fail_on_error: true
4 changes: 3 additions & 1 deletion .github/workflows/flake8_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: "3.8"
- run: pip install flake8-print flake8-black
- run: pip install flake8-print
- name: flake8 Lint
uses: reviewdog/action-flake8@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
fail_on_error: true

0 comments on commit 8aa194e

Please sign in to comment.