forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check to ensure error code explanations are not removed anymore e…
…ven if not emitted
- Loading branch information
1 parent
1aa6c7c
commit 13bdc5c
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/ci/docker/host-x86_64/mingw-check/validate-error-codes.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
# Checks that no error code explanation is removed. | ||
|
||
set -euo pipefail | ||
|
||
echo "Check if an error code explanation was removed..." | ||
|
||
if (git diff "$BASE_COMMIT" --name-status | grep '^D' \ | ||
| grep --quiet "compiler/rustc_error_codes/src/error_codes/"); then | ||
echo "Error code explanations should never be removed!" | ||
echo "Take a look at E0001 to see how to handle it." | ||
exit 1 | ||
fi | ||
|
||
echo "No error code explanation was removed!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters