Skip to content

Support annotation based suppression of API problems #2291

Description

@HannesWell

API problems issued by Api-Tools can currently only be suppressed by using the .api_filters file:

This can be cumbersome, especially for projects like SWT where multiple fragments projects for different CPU architectures share the codebase for that OS and generally using a separate file is also some overhead.

Similar to the java.lang.SuppressWarnings annotation, used to suppress Java compiler warnings, Api-Tools should instead/also provide an annotation based way to manage ignoring API problems.
Analogous the annotation could be named @SuppressAPIProblems.
It would be applied to affected classes or class elements and should accept corresponding parameters to specify the kind of suppressed problem as required (and similar to the values one can pass to @SuppressWarnings).

The RetentionPolicy can probably also be SOURCE if it's not necessary to read them for baseline artifacts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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