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

Validate the formatting of extended errors. #24458

Closed
wants to merge 3 commits into from
Closed

Validate the formatting of extended errors. #24458

wants to merge 3 commits into from

Conversation

michaelsproul
Copy link
Contributor

I've updated the diagnostic registration plugin so that it validates error descriptions. An error description is only valid if it starts and ends with a newline, and contains no more than 80 characters per line.

The plugin forced me to fix E0005 and E0006 which had escaped manual attention!

I've also added errors for E0267, E0268, E0296, whilst updating E0303 as per discussion in #24143.

cc #24407

@rust-highfive
Copy link
Collaborator

r? @nrc

(rust_highfive has picked a reviewer for you, use r? to override)

@@ -20,6 +20,9 @@ use parse::token;
use ptr::P;
use util::small_vector::SmallVector;

// Maximum width of any line in an extended error description (inclusive).
static MAX_DESCRIPTION_WIDTH: usize = 80;
Copy link
Member

Choose a reason for hiding this comment

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

This probably makes more sense as a const (we care about the value itself, not the memory location).

@michaelsproul
Copy link
Contributor Author

@huonw: Fixed.

@huonw
Copy link
Member

huonw commented Apr 15, 2015

@bors r+

@bors
Copy link
Contributor

bors commented Apr 15, 2015

📌 Commit c17e78c has been approved by huonw

@bors
Copy link
Contributor

bors commented Apr 17, 2015

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

Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 17, 2015
 I've updated the diagnostic registration plugin so that it validates error descriptions. An error description is only valid if it starts and ends with a newline, and contains no more than 80 characters per line.

The plugin forced me to fix E0005 and E0006 which had escaped manual attention!

I've also added errors for E0267, E0268, E0296, whilst updating E0303 as per discussion in rust-lang#24143.

cc rust-lang#24407
@michaelsproul
Copy link
Contributor Author

@Manishearth: I was fixing this up with a rebase but it seems you have it covered?

For the next batch of errors I could do one PR with everyone's commits?

@Manishearth
Copy link
Member

Sure; that would be nice.

@alexcrichton
Copy link
Member

Closing in favor of the merged version at #24542

Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 18, 2015
I did a manual merge of all the extended error PRs as we were getting merge conflicts yesterday. I think this is preferable to merging separately as I ended up having to manually merge @nham and @GuillaumeGomez's commits.

Rollup of rust-lang#24458, rust-lang#24482 and rust-lang#24488.

rust-lang#24482 and rust-lang#24488 were already re-approved, and would need to be cancelled if this is merged instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants