-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from redhatrises/add_py_linting
Add Python linting for modules
- Loading branch information
Showing
7 changed files
with
697 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[flake8] | ||
ignore = E501,E402 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Python Lint | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'plugins/**' | ||
- '.github/workflows/linting.yml' | ||
|
||
pull_request: | ||
paths: | ||
- 'plugins/**' | ||
- '.github/workflows/linting.yml' | ||
|
||
jobs: | ||
flake8: | ||
runs-on: ubuntu-latest | ||
env: | ||
PY_COLORS: 1 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 | ||
- name: Lint with flake8 | ||
run: | ||
flake8 ./plugins/ | ||
|
||
pylint: | ||
runs-on: ubuntu-latest | ||
env: | ||
PY_COLORS: 1 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install pylint | ||
- name: Lint with pylint | ||
run: | | ||
pylint ./plugins/ | ||
bandit: | ||
runs-on: ubuntu-latest | ||
env: | ||
PY_COLORS: 1 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install bandit | ||
- name: Lint with bandit | ||
run: | | ||
bandit -l -i -r ./plugins/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
*.tar.gz | ||
|
||
*DS_Store | ||
*.swp |
Oops, something went wrong.