Skip to content

Commit

Permalink
Add more pre-commit hooks (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
hofbi authored Nov 18, 2024
1 parent 9526f2e commit dfe2c1b
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .md-link-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"ignorePatterns": [
{
"pattern": "^https://"
},
{
"pattern": "^http://"
},
{
"pattern": "^mailto:"
}
],
"timeout": "200ms",
"retryOn429": true,
"retryCount": 1,
"fallbackRetryDelay": "200ms",
"aliveStatusCodes": [
200,
206
]
}
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,22 @@ repos:
hooks:
- id: blacken-docs
args: [--line-length=120]
- repo: https://github.com/tcort/markdown-link-check
# Stick to 3.11.2 until https://github.com/tcort/markdown-link-check/issues/325 is fixed
rev: v3.11.2
hooks:
- id: markdown-link-check
args: ["--quiet", "--config", ".md-link-config.json"]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
hooks:
- id: markdownlint
args: ["--dot", "--fix"]
- repo: https://github.com/jendrikseipp/vulture
rev: v2.13
hooks:
- id: vulture
pass_filenames: true
# Enable once https://github.com/renovatebot/pre-commit-hooks/issues/2460 is resolved
# - repo: https://github.com/renovatebot/pre-commit-hooks
# rev: 38.77.3
Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,15 @@ ignore = [
"D",
"E501", # Line length is the task of the formatter
"FA100",
"ISC001", # Conflicts with formatter
"S101",
"S603",
"T201"
]

[tool.vulture]
min_confidence = 100
ignore_decorators = ["@pytest.fixture"]
exclude = [
"*test_*.py" # vulture doesn't understand pytest fixtures
]

0 comments on commit dfe2c1b

Please sign in to comment.