Skip to content

Update tidy check for error codes testing - #66574

Merged
bors merged 1 commit into
rust-lang:masterfrom
GuillaumeGomez:update-tidy-err-code-check
Nov 23, 2019
Merged

Update tidy check for error codes testing#66574
bors merged 1 commit into
rust-lang:masterfrom
GuillaumeGomez:update-tidy-err-code-check

Conversation

@GuillaumeGomez

@GuillaumeGomezGuillaumeGomez commented Nov 20, 2019

Copy link
Copy Markdown
Member

Now that all the error codes have been grouped into one file, we moved the long error explanations into markdown files, which means that we need to read those markdown file to also count their code blocks as well.

So 2 "big" things happened here:

  • No more need to keep the current error code when reading the error_codes.rs file since it's been put into the equivalent markdown file.
  • Need to instead read the markdown file (but it's simpler since I can just look for code blocks directly).

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 20, 2019
Comment threadsrc/tools/tidy/src/error_codes_check.rs Outdated
@GuillaumeGomez
GuillaumeGomezforce-pushed the update-tidy-err-code-check branch from b03aae2 to 749d731CompareNovember 20, 2019 13:31
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Updated.

@Mark-Simulacrum

Copy link
Copy Markdown
Member

Could you also say a bit about what this is doing? i.e., what is the goal of this PR, what are we trying to change, and why? I don't have the time to dig into that myself so it'd make an r+ easier on my end.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Sure. Now that all the error codes have been grouped into one file, we moved the long error explanations into markdown files, which means that we need to read those markdown file to also count their code blocks as well.

So 2 "big" things happened here:

  • No more need to keep the current error code when reading the error_codes.rs file since it's been put into the equivalent markdown file.
  • Need to instead read the markdown file (but it's simpler since I can just look for code blocks directly).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we use fs::read_to_string here? Seems like there's no reason why not?

@Mark-Simulacrum

Copy link
Copy Markdown
Member

For the future it'd be great to include that information in the commit; I've copied it into the PR description.

r=me with last nit fixed

@GuillaumeGomez
GuillaumeGomezforce-pushed the update-tidy-err-code-check branch from 749d731 to df9fed1CompareNovember 21, 2019 12:13
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Indeed, sorry...

@Mark-Simulacrum

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Nov 21, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit df9fed1 has been approved by Mark-Simulacrum

@borsbors 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 Nov 21, 2019
Centril added a commit to Centril/rust that referenced this pull request Nov 23, 2019
…-check, r=Mark-Simulacrum
Update tidy check for error codes testing
Now that all the error codes have been grouped into one file, we moved the long error explanations into markdown files, which means that we need to read those markdown file to also count their code blocks as well.
So 2 "big" things happened here:
* No more need to keep the current error code when reading the `error_codes.rs` file since it's been put into the equivalent markdown file.
* Need to instead read the markdown file (but it's simpler since I can just look for code blocks directly).
@CentrilCentril mentioned this pull request Nov 23, 2019
bors added a commit that referenced this pull request Nov 23, 2019
Rollup of 4 pull requests
Successful merges:
- #65961 (add fn type_name_of_val)
- #66574 (Update tidy check for error codes testing)
- #66576 (made gdb pretty-printing more robust when printing uninitialized vec)
- #66583 (Clarify Step Documentation)
Failed merges:
r? @ghost
@bors

bors commented Nov 23, 2019

Copy link
Copy Markdown
Collaborator

⌛ Testing commit df9fed1 with merge d902539...

@bors
bors merged commit df9fed1 into rust-lang:masterNov 23, 2019
@GuillaumeGomez
GuillaumeGomez deleted the update-tidy-err-code-check branch November 23, 2019 11:00
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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.

4 participants

@GuillaumeGomez@Mark-Simulacrum@bors@rust-highfive