Skip to content

Skip diagnostic codes occurring inside a long diagnostic in errorck. #26984

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

Merged
merged 2 commits into from
Jul 13, 2015

Conversation

nham
Copy link
Contributor

@nham nham commented Jul 12, 2015

Currently errorck yields bogus duplicate error code messages when an error code occurs inside of a long diagnostic message (see #26982), because errorck just goes line by line checking for error codes and recording them all.

A simplistic approach to fixing this is just to detect the beginning of a long diagnostic raw string literal (r##") and skip lines until the end of the raw string literal is encountered. I'm not completely confident in this approach, but I think a more robust approach would be more complicated and I wanted to get feedback before pursuing that.

@rust-highfive
Copy link
Contributor

r? @brson

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

@nham
Copy link
Contributor Author

nham commented Jul 13, 2015

@brson Comments have been added

@brson
Copy link
Contributor

brson commented Jul 13, 2015

@bors r+ Thanks!

@bors
Copy link
Collaborator

bors commented Jul 13, 2015

📌 Commit 4630fc7 has been approved by brson

bors added a commit that referenced this pull request Jul 13, 2015
Currently errorck yields bogus `duplicate error code` messages when an error code occurs inside of a long diagnostic message (see #26982), because errorck just goes line by line checking for error codes and recording them all.

A simplistic approach to fixing this is just to detect the beginning of a long diagnostic raw string literal (`r##"`) and skip lines until the end of the raw string literal is encountered. I'm not completely confident in this approach, but I think a more robust approach would be more complicated and I wanted to get feedback before pursuing that.
@bors
Copy link
Collaborator

bors commented Jul 13, 2015

⌛ Testing commit 4630fc7 with merge 6800538...

@bors bors merged commit 4630fc7 into rust-lang:master Jul 13, 2015
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.

4 participants