Skip to content

Commit

Permalink
reduce annotations #485
Browse files Browse the repository at this point in the history
  • Loading branch information
Luro02 committed May 16, 2024
1 parent 4789717 commit ccba5db
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import spoon.reflect.path.CtRole;
import spoon.reflect.reference.CtTypeReference;

import java.util.Optional;

@ExecutableCheck(reportedProblems = { ProblemType.DO_NOT_USE_RAW_TYPES })
public class DoNotUseRawTypes extends IntegratedCheck {
private boolean isRawType(CtTypeReference<?> ctTypeReference) {
Expand Down Expand Up @@ -48,4 +50,9 @@ public void process(CtTypeReference<?> ctTypeReference) {
}
});
}

@Override
public Optional<Integer> maximumProblems() {
return Optional.of(4);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import spoon.reflect.reference.CtTypeReference;

import java.util.Map;
import java.util.Optional;

@ExecutableCheck(reportedProblems = { ProblemType.OBJECT_DATATYPE })
public class ObjectDatatype extends IntegratedCheck {
Expand Down Expand Up @@ -45,4 +46,9 @@ public void process(CtVariable<?> ctVariable) {
}
});
}

@Override
public Optional<Integer> maximumProblems() {
return Optional.of(4);
}
}

0 comments on commit ccba5db

Please sign in to comment.