Skip to content

Support @SuppressWarnings for skipping deprecation architecture rule violations #50

@atkawa7

Description

@atkawa7

Currently, the DeprecationRule architecture test checks all configured ArchUnit rules and fails when deprecated usage is detected.

Example:

@test
public void deprecation_rule() {
JavaClasses importedClasses = new ClassFileImporter()
.importPackages(HttpClientAdapter.class.getPackage().getName());

DeprecationRule deprecationRule = new DeprecationRule();

for (Map.Entry<String, ArchRule> entry : deprecationRule.getRules().entrySet()) {
    entry.getValue().check(importedClasses);
}

}

There are cases where deprecated usage is intentional, temporary, or unavoidable, especially when integrating with third-party APIs or legacy internal APIs.

The library should support skipping/suppressing specific deprecation rule violations using @SuppressWarnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions