Skip to content

Commit

Permalink
Merge pull request rust-lang#4087 from tgross35/style-find-duplicates
Browse files Browse the repository at this point in the history
Add a check that semver files don't contain duplicate entries
  • Loading branch information
tgross35 authored Nov 17, 2024
2 parents fffcd4b + 1568789 commit 86b04cb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ci/style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ rustfmt -V
cargo fmt --all -- --check

if shellcheck --version ; then
find . -name '*.sh' -exec shellcheck {} ';'
find . -name '*.sh' -print0 | xargs -0 shellcheck
else
echo "shellcheck not found"
exit 1
Expand All @@ -29,4 +29,12 @@ for file in libc-test/semver/*.txt; do
echo "Unsorted semver file $file"
exit 1
fi

duplicates=$(uniq -d "$file")
if [ -n "$duplicates" ]; then
echo "Semver file $file contains duplicates:"
echo "$duplicates"

exit 1
fi
done

0 comments on commit 86b04cb

Please sign in to comment.