Skip to content

Commit 86b04cb

Browse files
authored
Merge pull request #4087 from tgross35/style-find-duplicates
Add a check that semver files don't contain duplicate entries
2 parents fffcd4b + 1568789 commit 86b04cb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ci/style.sh

+9-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ rustfmt -V
1111
cargo fmt --all -- --check
1212

1313
if shellcheck --version ; then
14-
find . -name '*.sh' -exec shellcheck {} ';'
14+
find . -name '*.sh' -print0 | xargs -0 shellcheck
1515
else
1616
echo "shellcheck not found"
1717
exit 1
@@ -29,4 +29,12 @@ for file in libc-test/semver/*.txt; do
2929
echo "Unsorted semver file $file"
3030
exit 1
3131
fi
32+
33+
duplicates=$(uniq -d "$file")
34+
if [ -n "$duplicates" ]; then
35+
echo "Semver file $file contains duplicates:"
36+
echo "$duplicates"
37+
38+
exit 1
39+
fi
3240
done

0 commit comments

Comments
 (0)