-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
WIP: Fix test style in unused parentheses lint test #63257
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f9210df
fix: Update unused_parens_json_suggestion.rs test
monoflo 5d5b72a
fix: Update unused_parens_json_suggestion.rs test
monoflo b14a017
fix: Drop pretty-json from use_suggestion_json.rs
monoflo 893b857
fix: Set error format argument to json
monoflo 24b2057
fix: Rectify stderr, fixed files using x.py
monoflo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,106 +1,16 @@ | ||
{ | ||
"message": "unnecessary parentheses around assigned value", | ||
"code": { | ||
"code": "unused_parens", | ||
"explanation": null | ||
}, | ||
"level": "warning", | ||
"spans": [ | ||
{ | ||
"file_name": "$DIR/unused_parens_json_suggestion.rs", | ||
"byte_start": 654, | ||
"byte_end": 667, | ||
"line_start": 17, | ||
"line_end": 17, | ||
"column_start": 14, | ||
"column_end": 27, | ||
"is_primary": true, | ||
"text": [ | ||
{ | ||
"text": " let _a = (1 / (2 + 3));", | ||
"highlight_start": 14, | ||
"highlight_end": 27 | ||
} | ||
], | ||
"label": null, | ||
"suggested_replacement": null, | ||
"suggestion_applicability": null, | ||
"expansion": null | ||
} | ||
], | ||
"children": [ | ||
{ | ||
"message": "lint level defined here", | ||
"code": null, | ||
"level": "note", | ||
"spans": [ | ||
{ | ||
"file_name": "$DIR/unused_parens_json_suggestion.rs", | ||
"byte_start": 472, | ||
"byte_end": 485, | ||
"line_start": 11, | ||
"line_end": 11, | ||
"column_start": 9, | ||
"column_end": 22, | ||
"is_primary": true, | ||
"text": [ | ||
{ | ||
"text": "#![warn(unused_parens)]", | ||
"highlight_start": 9, | ||
"highlight_end": 22 | ||
} | ||
], | ||
"label": null, | ||
"suggested_replacement": null, | ||
"suggestion_applicability": null, | ||
"expansion": null | ||
} | ||
], | ||
"children": [], | ||
"rendered": null | ||
}, | ||
{ | ||
"message": "remove these parentheses", | ||
"code": null, | ||
"level": "help", | ||
"spans": [ | ||
{ | ||
"file_name": "$DIR/unused_parens_json_suggestion.rs", | ||
"byte_start": 654, | ||
"byte_end": 667, | ||
"line_start": 17, | ||
"line_end": 17, | ||
"column_start": 14, | ||
"column_end": 27, | ||
"is_primary": true, | ||
"text": [ | ||
{ | ||
"text": " let _a = (1 / (2 + 3));", | ||
"highlight_start": 14, | ||
"highlight_end": 27 | ||
} | ||
], | ||
"label": null, | ||
"suggested_replacement": "1 / (2 + 3)", | ||
"suggestion_applicability": "MachineApplicable", | ||
"expansion": null | ||
} | ||
], | ||
"children": [], | ||
"rendered": null | ||
} | ||
], | ||
"rendered": "warning: unnecessary parentheses around assigned value | ||
--> $DIR/unused_parens_json_suggestion.rs:17:14 | ||
{"message":"unnecessary parentheses around assigned value","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":596,"byte_end":609,"line_start":16,"line_end":16,"column_start":14,"column_end":27,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3)); | ||
--> $DIR/unused_parens_json_suggestion.rs:16:14 | ||
| | ||
LL | let _a = (1 / (2 + 3)); | ||
| ^^^^^^^^^^^^^ help: remove these parentheses | ||
| | ||
note: lint level defined here | ||
--> $DIR/unused_parens_json_suggestion.rs:11:9 | ||
--> $DIR/unused_parens_json_suggestion.rs:10:9 | ||
| | ||
LL | #![warn(unused_parens)] | ||
LL | #![deny(unused_parens)] | ||
| ^^^^^^^^^^^^^ | ||
|
||
" | ||
} | ||
"} | ||
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error | ||
|
||
"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
it seems like pretty-json is more "diff friendly", even so, no?