Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/auto-pull-request-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ on:
- dependabot/**

permissions:
contents: read
contents: write
packages: write
pull-requests: write
issues: write

jobs:
call:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/auto-release-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ on:
permissions:
contents: write
packages: write
pull-requests: read
pull-requests: write
issues: write

jobs:
call:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/manual-release-branch-prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ permissions:
contents: write
packages: write
pull-requests: write
issues: write

jobs:
call:
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ repos:
rev: v6.0.0
hooks:
- id: check-added-large-files
exclude: ^img/
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-illegal-windows-names
Expand Down Expand Up @@ -39,3 +40,8 @@ repos:
entry: bash -lc 'docker run --rm -v "$PWD:/work" -w /work cytopia/yamllint -c .yamllint.yml "$@"' --
language: system
files: \.(yml|yaml)$
- id: pylint
name: pylint
entry: python3 -m pylint --rcfile .pylintrc
language: system
files: \.py$
26 changes: 26 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
[MASTER]
disable=
C0114, # missing-module-docstring
C0115, # missing-class-docstring
C0116, # missing-function-docstring
C0301, # line-too-long
C0207, # use-maxsplit-arg
C0411, # wrong-import-order
R0902, # too-many-instance-attributes
R0904, # too-many-public-methods
R0912, # too-many-branches
R0913, # too-many-arguments
R0914, # too-many-locals
R0917, # too-many-positional-arguments
R1705, # no-else-return
R1732, # consider-using-with
W0221, # arguments-differ
W0511, # fixme
W0611, # unused-import
W0612, # unused-variable
W0613, # unused-argument
W0621, # redefined-outer-name
W0706, # try-except-raise
W0718, # broad-exception-caught
W1309, # f-string-without-interpolation
W1508, # invalid-envvar-default
W1514, # unspecified-encoding
E1101, # no-member
C2801 # unnecessary-dunder-call
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ safe environment before using it.**
Since it operates on the infrastructure, user is responsible for the consequences of the actions taken by the tool and
should review the code before using it.

![Velez](img/velez.jpg)
![Velez](img/velez.png)


## Advantages
Expand Down
6 changes: 6 additions & 0 deletions Taskfile.cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ tasks:
- task: lint:actionlint
- task: lint:shellcheck
- task: lint:yamllint
- task: lint:pylint

lint:actionlint:
desc: Lint GitHub Actions workflows with actionlint
Expand All @@ -37,6 +38,11 @@ tasks:
cmds:
- task: scripts:lint:yamllint

lint:pylint:
desc: Lint Python files with pylint
cmds:
- task: scripts:lint:pylint

dependency:update:
desc: 'No-op: no dedicated dependency updater configured for this profile'
cmds:
Expand Down
30 changes: 29 additions & 1 deletion Taskfile.scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,34 @@ tasks:
exit $rc
fi

lint:pylint:
desc: Lint Python files with pylint
cmds:
- |
set -eu
echo "▶️ Running pylint..."
files="$(git ls-files '*.py' || true)"
if [ -z "${files}" ]; then
echo "ℹ️ No Python files found, skipping pylint"
exit 0
fi

mkdir -p .tmp
VENV_DIR=".tmp/pylint-venv"
python3 -m venv "${VENV_DIR}"
# shellcheck disable=SC1091
. "${VENV_DIR}/bin/activate"

python -m pip install --upgrade pip
if [ -f requirements.txt ]; then
python -m pip install -r requirements.txt
else
python -m pip install pylint
fi

python -m pylint --rcfile .pylintrc ${files}
echo "✅ pylint passed"

dependency:update:
desc: 'No-op: no dedicated dependency updater configured for this profile'
cmds:
Expand All @@ -102,7 +130,7 @@ tasks:
desc: Get pull request template
cmds:
- mkdir -p .tmp
- curl -LsS https://raw.githubusercontent.com/devops-infra/.github/master/PULL_REQUEST_TEMPLATE.md -o .tmp/PULL_REQUEST_TEMPLATE.md
- curl -LsS https://raw.githubusercontent.com/devops-infra/.github/refs/tags/v1/PULL_REQUEST_TEMPLATE.md -o .tmp/PULL_REQUEST_TEMPLATE.md

git:set-config:
desc: Set git user config
Expand Down
Binary file added img/velez.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ python-hcl2==8.1.2
PyGithub==2.9.1
pytest==9.0.3
build==1.5.0
pylint==3.3.4
Loading