Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error codes check run and ensure it will not go unnoticed again #83451

Merged
merged 1 commit into from
Apr 4, 2021

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Mar 24, 2021

Fixes #83268.

The error codes explanations were not checked anymore. I fixed this issue and also added variables to ensure that this won't happen again (at least not silently).

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 24, 2021
@GuillaumeGomez GuillaumeGomez added the A-error-codes Area: Explanation of an error code (--explain) label Mar 24, 2021
@@ -31,7 +31,7 @@ fn main() {

// Checks that only make sense for the compiler.
errors::check(&compiler_path, &mut bad);
error_codes_check::check(&src_path, &mut bad);
error_codes_check::check(&[&src_path, &compiler_path], &mut bad);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, what error codes exist under src/? Should we actually split this into two separate passes, one to collect tests under src/test/ui/error-codes and the other for errors in the compiler?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under src are the tests. We check that all error codes are emitted at least in one test. I think it'd be hard to split the two parts considering that on one side we iterate over all emitted error codes and on the other we list all error codes. At the end, we check that all listed error codes have been tested once.

@GuillaumeGomez
Copy link
Member Author

ping @Mark-Simulacrum

@Mark-Simulacrum
Copy link
Member

OK, seems reasonable enough. Thanks.

@bors r+ rollup=iffy

@bors
Copy link
Contributor

bors commented Apr 4, 2021

📌 Commit 865d0c6 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 4, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 4, 2021
…check, r=Mark-Simulacrum

Fix error codes check run and ensure it will not go unnoticed again

Fixes rust-lang#83268.

The error codes explanations were not checked anymore. I fixed this issue and also added variables to ensure that this won't happen again (at least not silently).
@bors
Copy link
Contributor

bors commented Apr 4, 2021

☔ The latest upstream changes (presumably #82347) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 4, 2021
@GuillaumeGomez GuillaumeGomez force-pushed the fix-error-code-tidy-check branch from 865d0c6 to a41d41c Compare April 4, 2021 12:39
@GuillaumeGomez
Copy link
Member Author

Fixed conflicts.

@bors: r=Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Apr 4, 2021

📌 Commit a41d41c has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 4, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 4, 2021
…check, r=Mark-Simulacrum

Fix error codes check run and ensure it will not go unnoticed again

Fixes rust-lang#83268.

The error codes explanations were not checked anymore. I fixed this issue and also added variables to ensure that this won't happen again (at least not silently).
@bors
Copy link
Contributor

bors commented Apr 4, 2021

⌛ Testing commit a41d41c with merge 5b0ab79...

@bors
Copy link
Contributor

bors commented Apr 4, 2021

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 5b0ab79 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 4, 2021
@bors bors merged commit 5b0ab79 into rust-lang:master Apr 4, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 4, 2021
@GuillaumeGomez GuillaumeGomez deleted the fix-error-code-tidy-check branch April 4, 2021 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-error-codes Area: Explanation of an error code (--explain) merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error code linter should detect when an error code isn't checked in its explanation
5 participants