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

ArchUnit ImmutabilityTest: fails falsely when using Eclipse #12214

Open
rnveach opened this issue Sep 18, 2022 · 0 comments
Open

ArchUnit ImmutabilityTest: fails falsely when using Eclipse #12214

rnveach opened this issue Sep 18, 2022 · 0 comments
Labels

Comments

@rnveach
Copy link
Member

rnveach commented Sep 18, 2022

Running ImmutabilityTest in Eclipse on a clean master fails with:

[ERROR] Failures: 
[ERROR]   ImmutabilityTest.testClassesWithMutableFieldsShouldBeStateful:313 Architecture Violation
 [Priority: MEDIUM] - Rule 'classes that do not have immutable fields and do not have modifier ABSTRACT
 should be annotated with @FileStatefulCheck or should be annotated with @GlobalStatefulCheck
 or should be suppressed' was violated (1 times):
Class <com.puppycrawl.tools.checkstyle.checks.annotation.> is not annotated with @FileStatefulCheck in
 (AnnotationUseStyleCheck.java:0) and Class <com.puppycrawl.tools.checkstyle.checks.annotation
.AnnotationUseStyleCheck> is not annotated with @GlobalStatefulCheck in (AnnotationUseStyleCheck.java:0)
 and should be suppressed or resolved.
[ERROR]   ImmutabilityTest.testFieldsInStatelessChecksShouldBeImmutable:272 Architecture Violation
 [Priority: MEDIUM] - Rule 'fields that are declared in classes that are annotated with @StatelessCheck
 and are not module properties should be among immutable types and should be final or should be suppressed'
 was violated (1 times):
Field <com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationUseStyleCheck.$SWITCH_TABLE
$com$puppycrawl$tools$checkstyle$checks$annotation$AnnotationUseStyleCheck$ElementStyleOption>
 does not have modifier FINAL in (AnnotationUseStyleCheck.java:0) and Field
 <com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationUseStyleCheck.$SWITCH_TABLE$com
$puppycrawl$tools$checkstyle$checks$annotation$AnnotationUseStyleCheck$ElementStyleOption>
 should be among immutable types in (AnnotationUseStyleCheck.java:0) and should be suppressed or resolved.

Expecting no failures as master passes in CI.

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

No branches or pull requests

2 participants