generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add dedicated pylint and black stage
- Loading branch information
Showing
4 changed files
with
496 additions
and
330 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,35 @@ | ||
name: Lint | ||
|
||
on: [pull_request] | ||
|
||
concurrency: | ||
group: >- | ||
${{ github.workflow }}-${{ | ||
github.event.pull_request.number || github.sha | ||
}} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
linter: | ||
name: Run linter | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
pip install pipenv | ||
pipenv sync | ||
- name: Run pylint | ||
run: pipenv run pylint tests plugins | ||
|
||
- name: Run black | ||
run: pipenv run python -m black --check --diff plugins tests |
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,22 @@ | ||
[MESSAGES CONTROL] | ||
|
||
disable= | ||
import-error, | ||
no-name-in-module, | ||
wrong-import-position, | ||
|
||
[BASIC] | ||
|
||
good-names= | ||
ex, | ||
__metaclass__, | ||
|
||
[TYPECHECK] | ||
|
||
ignored-modules= | ||
_MovedItems, | ||
|
||
[IMPORTS] | ||
|
||
preferred-modules = | ||
distutils.version:ansible.module_utils.compat.version, |
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
Oops, something went wrong.