Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix test style in unused parentheses lint test #63237

Closed
bravomikekilo opened this issue Aug 3, 2019 · 11 comments · Fixed by #65507
Closed

Fix test style in unused parentheses lint test #63237

bravomikekilo opened this issue Aug 3, 2019 · 11 comments · Fixed by #65507
Assignees
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. A-testsuite Area: The testsuite used to check the correctness of rustc C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@bravomikekilo
Copy link
Contributor

bravomikekilo commented Aug 3, 2019

Update test file to use #![deny(unused_parens)] + //~ ERROR annotations instead of pretty-json (see https://rust-lang.github.io/rustc-guide/tests/adding.html)

The files need to update are:

  • test/lint/unused_parens_json_suggestions.rs
  • test/lint/used_parens_remove_json_suggestion.rs

This issue has been assigned to @polyedre via this comment.

@Centril Centril added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Aug 3, 2019
@Centril Centril changed the title fix test style in unused parentheses lint test Fix test style in unused parentheses lint test Aug 3, 2019
@Centril Centril added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-testsuite Area: The testsuite used to check the correctness of rustc A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. labels Aug 3, 2019
@JohnTitor
Copy link
Member

is the correct file name use_suggestion_json.rs, not used_parens_remove_json_suggestion.rs?

And what about this comment?

// The output for humans should just highlight the whole span without showing
// the suggested replacement, but we also want to test that suggested
// replacement only removes one set of parentheses, rather than naïvely
// stripping away any starting or ending parenthesis characters—hence this
// test of the JSON error format.

@polyedre
Copy link
Contributor

Is the problem fixed ? If not, I would like to work on it !

@JohnTitor
Copy link
Member

@polyedre WIP PR has been closed due to inactivity so you can work on this.

@polyedre
Copy link
Contributor

@JohnTitor I would like to be assigned to this issue. Am I supposed to do a new pull request ?

@JohnTitor

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Oct 17, 2019

Error: Parsing assign command in comment failed: ...tbot claim|error: expected end of command at >| @polyedre...

Please let @rust-lang/release know if you're having trouble with this bot.

@JohnTitor

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Oct 17, 2019

Error: Parsing assign command in comment failed: ...tbot claim|error: expected end of command at >| @polyedre...

Please let @rust-lang/release know if you're having trouble with this bot.

@JohnTitor
Copy link
Member

JohnTitor commented Oct 17, 2019

Hmm, it's odd, anyway, you can assign the issue to yourself by comment @rustbot claim
Ah, I mistaken the command, the collect one is assign, sorry.

@polyedre
Copy link
Contributor

@rustbot claim

@rustbot rustbot self-assigned this Oct 17, 2019
@polyedre
Copy link
Contributor

If I understood well the problem:

  1. I must replace all the pretty-json by just json, even if this comment exist ?
  2. Because the output changes, I should modify the .stderr version
  3. I must change warning with deny in #![warn(unused_parens)], and as this line should raise an error we add //~ ERROR
  4. But why add //~ERROR in the *.fixed version ?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. A-testsuite Area: The testsuite used to check the correctness of rustc C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants