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

Do not reduce visibility of extended classes in TestsShouldNotBePublic #524

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

timtebeek
Copy link
Contributor

What's changed?

Turn TestsShouldNotBePublic into a ScanningRecipe that finds any extended classes, and excludes those from the recipe run.

What's your motivation?

Fixes #309

Anything in particular you'd like reviewers to focus on?

The approach of accumulating all extended classes is rather crude, but works. Didn't immediately see a good way to limit this further, as there's no guarantees as to features of classes that extend a common test base class, nor features that such a base class would have.

@timtebeek timtebeek self-assigned this Jun 13, 2024
@timtebeek timtebeek changed the title Do not reduce visibility on extended classes Do not reduce visibility of extended classes in TestsShouldNotBePublic Jun 13, 2024
@timtebeek timtebeek added the bug Something isn't working label Jun 13, 2024
…NotBePublic.java

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@timtebeek timtebeek merged commit 65711d5 into main Jun 13, 2024
2 checks passed
@timtebeek timtebeek deleted the do-not-reduce-visibility-on-extended-classes branch June 13, 2024 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

TestsShouldNotBePublic should not reduce visibility if test classes are extended
1 participant