Skip to content

Commit

Permalink
Merge branch 'ci/add_more_precommit_hooks' into 'main'
Browse files Browse the repository at this point in the history
ci: Add pre-commit hooks for markdown and leaked secrets

See merge request espressif/idf-component-manager!437
  • Loading branch information
kumekay committed Aug 20, 2024
2 parents 323ef11 + fcbaa8b commit da77faf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.5
rev: v0.6.1
hooks:
# Run the linter.
- id: ruff
Expand Down Expand Up @@ -50,7 +50,7 @@ repos:
]

- repo: https://github.com/fpgmaas/deptry.git
rev: "0.18.0"
rev: "0.19.1"
hooks:
- id: deptry

Expand All @@ -64,7 +64,7 @@ repos:
- --allow-breaking

- repo: https://github.com/hfudev/rstfmt
rev: v0.1.3
rev: v0.1.4
hooks:
- id: rstfmt
args: ["-w", "-1"]
Expand All @@ -73,3 +73,21 @@ repos:
"sphinx_tabs",
"sphinx-click",
]

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
hooks:
- id: mdformat
args: [--number] # Keep numbering for ordered lists
additional_dependencies:
- mdformat-gfm # Support for GitHub Flavored Markdown (GFM), including tables, task lists, strikethroughs, and autolinks.
- mdformat-ruff # Formats Python code blocks in Markdown files according to the `ruff` linter's style.
- mdformat-simple-breaks # Ensures that single line breaks in Markdown are converted to `<br>`

- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args:
- --base64-limit=5 # Level of entropy for base64 type strings
- --hex-limit=3 # Level of entropy for hex strings
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ For that, add `examples` field to the root of the manifest:
examples:
- path: ../some/path
- path: ../some/other_path
# - path: examples/some_example # this example will be discovered automatically
```

## Environment variables
Expand Down

0 comments on commit da77faf

Please sign in to comment.