Skip to content

Commit 8c1158e

Browse files
committed
Add check for C++-style comments
Also fix a single instance in sortedarray.h.
1 parent 76cc8aa commit 8c1158e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/make.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ jobs:
2323
echo
2424
false
2525
fi
26+
- name: Check comment style
27+
run: |
28+
if grep " //" */*.[ch]; then
29+
echo
30+
echo "*** C++-style comments were detected in the above lines."
31+
echo "*** Please change to use /* ... */ -style comments."
32+
echo
33+
false
34+
fi
2635
2736
build_and_coverage:
2837
runs-on: ubuntu-latest

src/sortedarray.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,4 @@ void sortedarray_clear(SortedArray *sortedarray);
164164
}
165165
#endif
166166

167-
#endif // #ifndef ALGORITHM_SORTEDARRAY_H
167+
#endif /* #ifndef ALGORITHM_SORTEDARRAY_H */

0 commit comments

Comments
 (0)