Skip to content

Commit

Permalink
tools: add yamllint (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau authored Feb 1, 2023
1 parent 0f3d7d0 commit 5a0d09f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/release-drafter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ categories:
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
template: |
Special thanks to the contributors that made this release happen: $CONTRIBUTORS
## Full list of changes
$CHANGES
12 changes: 12 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
ignore-from-file: [.gitignore]

extends: default

rules:
document-start: disable
float-values: enable
line-length: disable
octal-values: enable
truthy:
check-keys: false
5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,16 @@ deps =
ruff==0.0.236
# renovate: datasource=pypi
codespell[tomli]>=2.2.2
# renovate: datasource=pypi
yamllint==1.29.0
env_dir = {work_dir}/linting
runner = ignore_env_name_mismatch

[shellcheck]
find = find {tox_root} \( -name .git -o -name .tox \) -prune -o -print
filter = file --mime-type -Nnf- | grep shellscript | cut -f1 -d:

[testenv:lint-{black,ruff,shellcheck,codespell}]
[testenv:lint-{black,ruff,shellcheck,codespell,yaml}]
description = Lint the source code
base = testenv, lint
labels = lint
Expand All @@ -79,6 +81,7 @@ commands =
ruff: ruff --diff --respect-gitignore {posargs} .
shellcheck: xargs -ra {env_tmp_dir}/shellcheck_files shellcheck
codespell: codespell --toml {tox_root}/pyproject.toml {posargs}
yaml: yamllint {posargs} .

[testenv:lint-{mypy,pyright}]
description = Static type checking
Expand Down

0 comments on commit 5a0d09f

Please sign in to comment.