Skip to content

Commit 0760ad7

Browse files
authored
hashes at end of each line, and every 5 lines (#49)
* update * actually this is correct
1 parent 0c824dc commit 0760ad7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/scripts/ptc.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ sed --in-place '/^#pragma once$/d' ../library/**/*.hpp
2424
# remove //! @file
2525
sed --in-place '/^\/\/! @file$/d' ../library/**/*.hpp
2626
# remove NOLINTNEXTLINE comments
27-
sed --in-place '/^\/\/NOLINTNEXTLINE(readability-identifier-naming)$/d' ../library/**/*.hpp
27+
sed --in-place '/^\/\/ NOLINTNEXTLINE(readability-identifier-naming)$/d' ../library/**/*.hpp
2828

2929
#adds hash code comments
3030
chmod +x ../library/contest/hash.sh
3131
for header in ../library/**/*.hpp; do
3232
echo "$header"
3333
cp "$header" input
3434
lines="$(wc -l <input)"
35-
for i in $(seq 1 "$lines"); do
35+
for i in $(seq "$lines" -5 1); do
3636
hash=$(head -n "$i" input | sed '/^#include/d' | cpp -dD -P -fpreprocessed | ./../library/contest/hash.sh)
37-
sed -i "${i}s/^/\/\*${hash}\*\/ /" "$header"
37+
sed -i "${i}s/$/\/\/${hash}/" "$header"
3838
done
3939
done
4040

0 commit comments

Comments
 (0)