Skip to content

Commit dafcf45

Browse files
Add pre-commit hook checking example links (#620)
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>
1 parent ae3ac6e commit dafcf45

File tree

3 files changed

+204
-17
lines changed

3 files changed

+204
-17
lines changed

.pre-commit-config.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,25 @@ repos:
1717
args: ['-fallback-style=none', '-style=file', '-i']
1818
- repo: local
1919
hooks:
20-
- id: doxygen-check
21-
name: doxygen-check
20+
- id: check-doxygen
21+
name: check-doxygen
2222
entry: ./ci/pre-commit/doxygen.sh
2323
files: ^include/
2424
types_or: [file]
2525
language: system
2626
pass_filenames: false
2727
verbose: true
28+
- id: check-example-links
29+
name: check-example-links
30+
entry: ./ci/pre-commit/example_links.py
31+
files: ^examples/
32+
types: [cuda]
33+
language: python
34+
pass_filenames: false
35+
verbose: true
36+
additional_dependencies:
37+
- --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple
38+
- gitpython
2839

2940
default_language_version:
3041
python: python3

0 commit comments

Comments
 (0)