Skip to content

Commit

Permalink
add dedicated pylint and black stage
Browse files Browse the repository at this point in the history
  • Loading branch information
rekup committed Dec 14, 2023
1 parent 781f10e commit e2f75c3
Show file tree
Hide file tree
Showing 4 changed files with 496 additions and 330 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/lint.yml
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
22 changes: 22 additions & 0 deletions .pylintrc
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,
3 changes: 3 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ pytest = "==7.4.3"
pytest-forked = "==1.6.0"
pytest-xdist = "==3.3.1"
pyyaml = "==6.0.1"
pylint = "==3.0.3"
black = "==23.12.0"
dill = "==0.3.7"
Loading

0 comments on commit e2f75c3

Please sign in to comment.