Skip to content

Commit a3b4e0c

Browse files
authored
Merge pull request #1045 from stephenswat/ci/duplicate_cu_files
Add pre-commit check for duplicate CUDA files
2 parents c3f883f + 021ea97 commit a3b4e0c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
! [[ $(find device tests -name "*\.cu" | xargs -I {} basename {} | sort | uniq -d) ]]
4+
exit $?

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,11 @@ repos:
2929
name: Check taboo code patterns
3030
language: system
3131
entry: .github/check_taboos.sh
32+
33+
- repo: local
34+
hooks:
35+
- id: check_duplicate_cu_files
36+
name: Check duplicate .cu file names
37+
language: system
38+
entry: .github/check_duplicate_cu_files.sh
39+
pass_filenames: false

0 commit comments

Comments
 (0)