Skip to content

Expand wildcard imports (AvoidStarImport, 79 violations) #90

Description

@sspaink

AvoidStarImport flags import x.y.*. 79 instances across 52 files.

Top offenders

  • opa-builtins-token/.../TokenBuiltins.java — 5
  • opa-evaluator/.../ir/Evaluator.java — 4
  • opa-evaluator/src/test/.../ir/PolicyTest.java — 4
  • opa-evaluator/.../ast/builtin/impls/ArithmeticBuiltins.java — 3 (incl. java.lang.Math.*)
  • many test files using Assertions.* and Mockito.*

Decision needed

Tests using Assertions.* and Mockito.* static-imports are idiomatic JUnit/Mockito style. Two reasonable resolutions:

  1. Expand them all (mechanical IDE fix).
  2. Add an exception for org.junit.jupiter.api.Assertions and org.mockito.Mockito via <property name="excludes" value="..."/> on AvoidStarImport.

My lean: (2) for those two specific imports (matches community style), (1) for everything else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions