]> git.lizzy.rs Git - rust.git/blob - src/ci/docker/host-x86_64/mingw-check/validate-error-codes.sh
Auto merge of #95548 - rcvalle:rust-cfi-2, r=nagisa
[rust.git] / src / ci / docker / host-x86_64 / mingw-check / validate-error-codes.sh
1 #!/bin/bash
2 # Checks that no error code explanation is removed.
3
4 set -eo pipefail
5
6 if [[ -z "$BASE_COMMIT" ]]; then
7     echo "not checking error code explanations removal"
8     exit 0
9 fi
10
11 echo "Check if an error code explanation was removed..."
12
13 if (git diff "$BASE_COMMIT" --name-status | grep '^D' \
14         | grep --quiet "compiler/rustc_error_codes/src/error_codes/"); then
15     echo "Error code explanations should never be removed!"
16     echo "Take a look at E0001 to see how to handle it."
17     exit 1
18 fi
19
20 echo "No error code explanation was removed!"