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

Use replace_region_in_file for creating the lint list #4206

Merged
merged 1 commit into from
Jun 14, 2019
Merged

Conversation

flip1995
Copy link
Member

r? @phansch

changelog: none

@flip1995 flip1995 added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 14, 2019
@phansch
Copy link
Member

phansch commented Jun 14, 2019

Looks like update_lints expects another change now. Maybe the commas? @flip1995

@flip1995
Copy link
Member Author

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 🙏

@phansch
Copy link
Member

phansch commented Jun 14, 2019

@bors r+ thanks!

@bors
Copy link
Contributor

bors commented Jun 14, 2019

📌 Commit 0e480ca has been approved by phansch

@bors
Copy link
Contributor

bors commented Jun 14, 2019

⌛ Testing commit 0e480ca with merge e5a7722...

bors added a commit that referenced this pull request Jun 14, 2019
Use replace_region_in_file for creating the lint list

r? @phansch

changelog: none
@bors
Copy link
Contributor

bors commented Jun 14, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: phansch
Pushing e5a7722 to master...

@bors bors merged commit 0e480ca into master Jun 14, 2019
@flip1995 flip1995 deleted the update_lints branch June 14, 2019 15:25
Lint {
name: "redundant_static_lifetimes",
group: "style",
desc: "Using explicit `\'static` lifetime for constants or statics when elision rules would allow omitting them.",
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, but this Regex:

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

desc: NL_ESCAPE_RE.replace(&desc.replace("\\\"", "\""), "").to_string(),

just like \" is. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants