Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/scripts/ptc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ sed --in-place '/^#pragma once$/d' ../library/**/*.hpp
# remove //! @file
sed --in-place '/^\/\/! @file$/d' ../library/**/*.hpp
# remove NOLINTNEXTLINE comments
sed --in-place '/^\/\/NOLINTNEXTLINE(readability-identifier-naming)$/d' ../library/**/*.hpp
sed --in-place '/^\/\/ NOLINTNEXTLINE(readability-identifier-naming)$/d' ../library/**/*.hpp

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

Expand Down