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

Disallow static import of com.google.errorprone.{VisitorState,util.ASTHelpers} members #922

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

rickie
Copy link
Member

@rickie rickie commented Dec 15, 2023

Saw this during a code review 😄.

Probably we can add more from Error Prone later. I checked some other classes from Error Prone but these are clear improvements that we also have been discussing before. Therefore, I decided to start with these two.

@rickie rickie requested a review from benhalasi December 15, 2023 07:43
@rickie rickie added this to the 0.15.0 milestone Dec 15, 2023
Copy link

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@Stephan202 Stephan202 force-pushed the rossendrijver/nonstaticimport_EP_stuff branch from a5b99c1 to 78cfcb7 Compare December 16, 2023 12:22
Copy link
Member

@Stephan202 Stephan202 left a comment

Choose a reason for hiding this comment

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

Rebased and added a commit. At least one Error Prone check has a suggested fix in which an ASTHelpers method is statically imported, so it's nice that this is now auto-fixed.

Suggested commit message:

Disallow static import of `com.google.errorprone.{VisitorState,util.ASTHelpers}` members (#922)

"com.google.errorprone.util.ASTHelpers",
"com.google.errorprone.VisitorState",
Copy link
Member

Choose a reason for hiding this comment

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

To match the GJF's import order:

Suggested change
"com.google.errorprone.util.ASTHelpers",
"com.google.errorprone.VisitorState",
"com.google.errorprone.VisitorState",
"com.google.errorprone.util.ASTHelpers",

Copy link

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@Stephan202 Stephan202 force-pushed the rossendrijver/nonstaticimport_EP_stuff branch from 78cfcb7 to fd22854 Compare December 18, 2023 16:51
Copy link

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@Stephan202 Stephan202 merged commit cc36aa9 into master Dec 18, 2023
16 checks passed
@Stephan202 Stephan202 deleted the rossendrijver/nonstaticimport_EP_stuff branch December 18, 2023 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants