Skip to content

Commit

Permalink
Add pre-commit hook checking example links (#620)
Browse files Browse the repository at this point in the history
Replace #613

This PR introduces a pre-commit hook that automatically verifies and
updates the Godbolt links in the `README` when there are discrepancies
between the example files and their associated links.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
PointKernel and pre-commit-ci[bot] authored Oct 18, 2024
1 parent ae3ac6e commit dafcf45
Show file tree
Hide file tree
Showing 3 changed files with 204 additions and 17 deletions.
15 changes: 13 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,25 @@ repos:
args: ['-fallback-style=none', '-style=file', '-i']
- repo: local
hooks:
- id: doxygen-check
name: doxygen-check
- id: check-doxygen
name: check-doxygen
entry: ./ci/pre-commit/doxygen.sh
files: ^include/
types_or: [file]
language: system
pass_filenames: false
verbose: true
- id: check-example-links
name: check-example-links
entry: ./ci/pre-commit/example_links.py
files: ^examples/
types: [cuda]
language: python
pass_filenames: false
verbose: true
additional_dependencies:
- --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple
- gitpython

default_language_version:
python: python3
Loading

0 comments on commit dafcf45

Please sign in to comment.