Skip to content

Commit a0a51d2

Browse files
committed
fix code
1 parent de11637 commit a0a51d2

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

code-assert/src/main/java/guru/nidi/codeassert/pmd/CpdMatchCollector.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import net.sourceforge.pmd.cpd.Mark;
2020
import net.sourceforge.pmd.cpd.Match;
2121

22-
import java.util.Iterator;
2322
import java.util.List;
2423

2524
import static guru.nidi.codeassert.util.ListUtils.andJoin;
@@ -44,7 +43,7 @@ public String toString() {
4443
@Override
4544
protected ActionResult doAccept(Match issue, Ignore action) {
4645
ActionResult res = ActionResult.undecided(null);
47-
for (Mark mark : issue) {
46+
for (final Mark mark : issue) {
4847
final Language language = Language.byFilename(mark.getFilename());
4948
res = res.orMoreQuality(action.accept(
5049
new NamedLocation(mark.getSourceCodeSlice(), language, PmdUtils.className(mark), "", false)));

code-assert/src/main/java/guru/nidi/codeassert/pmd/CpdMatcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ private String printMatch(Match match) {
5151

5252
private List<Mark> getMarks(Match match) {
5353
final List<Mark> marks = new ArrayList<>();
54-
for (Mark mark : match) {
54+
for (final Mark mark : match) {
5555
marks.add(mark);
5656
}
5757
marks.sort(MARK_COMPARATOR);

code-assert/src/test/java/guru/nidi/codeassert/checkstyle/CheckstyleTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ void google() {
7373
+ line(WARNING, "abbreviation.as.word", MAIN, "pmd/PmdRulesets", 165, "Abbreviation in name 'serialVersionUID' must contain no more than '1' capital letters.")
7474
+ line(WARNING, "abbreviation.as.word", MAIN, "pmd/PmdRulesets", 210, "Abbreviation in name 'serialVersionUID' must contain no more than '1' capital letters.")
7575
+ line(WARNING, "empty.line.separator", TEST, "io/ModelVisualizerTest", 59, "',' should be separated from previous statement.")
76-
+ line(WARNING, "indentation.error", MAIN, "model/InternalTypeInPublicApiMatcher", 48, "'lambda arguments' have incorrect indentation level 32, expected level should be 28.")
77-
+ line(WARNING, "indentation.error", MAIN, "model/InternalTypeInPublicApiMatcher", 50, "'lambda arguments' have incorrect indentation level 32, expected level should be 28.")
76+
+ line(WARNING, "indentation.error", MAIN, "model/InternalTypeInPublicApiMatcher", 45, "'lambda arguments' have incorrect indentation level 32, expected level should be 28.")
77+
+ line(WARNING, "indentation.error", MAIN, "model/InternalTypeInPublicApiMatcher", 47, "'lambda arguments' have incorrect indentation level 32, expected level should be 28.")
7878
+ line(WARNING, "one.top.level.class", TEST, "model/ExampleConcreteClass", 79, "Top-level class ExamplePackageClass has to reside in its own source file.")
7979
+ line(WARNING, "overload.methods.declaration", MAIN, "config/BaseCollector", 58, "Overload methods should not be split. Previous overloaded method located at line '52'.")
8080
+ line(WARNING, "overload.methods.declaration", MAIN, "config/BaseCollector", 69, "Overload methods should not be split. Previous overloaded method located at line '56'.")

0 commit comments

Comments
 (0)