-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Use replace_region_in_file for creating the lint list #4206
Conversation
Looks like update_lints expects another change now. Maybe the commas? @flip1995 |
Oh yeah. It seems that the formatting of lists and Ctors changed "recently". I was using an old nightly, which didn't include the commas. Also #4138 renamed a lint. Rebased on master. Now travis should be green 🙏 |
@bors r+ thanks! |
📌 Commit 0e480ca has been approved by |
Use replace_region_in_file for creating the lint list r? @phansch changelog: none
☀️ Test successful - checks-travis, status-appveyor |
Lint { | ||
name: "redundant_static_lifetimes", | ||
group: "style", | ||
desc: "Using explicit `\'static` lifetime for constants or statics when elision rules would allow omitting them.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the backward slash \ necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but this Regex:
rust-clippy/clippy_dev/src/lib.rs
Lines 165 to 167 in be5d17f
let lints = DEC_CLIPPY_LINT_RE | |
.captures_iter(content) | |
.map(|m| Lint::new(&m["name"], &m["cat"], &m["desc"], None, filename)); |
probably adds it, while parsing the description of the lint. This could be handled here
rust-clippy/clippy_dev/src/lib.rs
Line 49 in be5d17f
desc: NL_ESCAPE_RE.replace(&desc.replace("\\\"", "\""), "").to_string(), |
just like \"
is. 🤔
r? @phansch
changelog: none