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

Relocate AccessModifierOption #12445

Open
nrmancuso opened this issue Nov 23, 2022 · 0 comments
Open

Relocate AccessModifierOption #12445

nrmancuso opened this issue Nov 23, 2022 · 0 comments

Comments

@nrmancuso
Copy link
Member

Noticed at #12340 (comment), AccessModifierOption

currently lives in the naming package, but is used elsewhere. This class should be moved to a more general location.

This also causes a lot of ArchUnit violations:

➜  archunit-store git:(issue-12435) ✗ cat slices_should_be_free_of_cycles_suppressions | grep AccessModifierOption | wc -l
47

Here is where we import this class:

➜  checkstyle git:(issue-12435) ✗ ag -lQ "naming.AccessModifierOption" --java      
src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java
src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnusedLocalVariableCheck.java
src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java
src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/ParameterNameCheck.java
src/main/java/com/puppycrawl/tools/checkstyle/checks/sizes/RecordComponentNumberCheck.java
src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtil.java
src/test/java/com/puppycrawl/tools/checkstyle/api/AutomaticBeanTest.java
src/test/java/com/puppycrawl/tools/checkstyle/internal/XdocsJavaDocsTest.java
src/test/java/com/puppycrawl/tools/checkstyle/internal/XdocsPagesTest.java
src/test/java/com/puppycrawl/tools/checkstyle/utils/CheckUtilTest.java

Also, see #3511, where we have an approved issue to replace Scope with AccessModifierOption

We also have a PR hanging to migrate another check to AccessModifierOption: #9277

We should consider moving AccessModiferOption to the api package before fully deprecating Scope, to allow users to migrate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant