Skip to content

Commit 0f2e67f

Browse files
committed
Line numbers must be 1-based
1 parent bdecbad commit 0f2e67f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin-maven/src/main/java/com/diffplug/spotless/maven/SpotlessCheckMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ protected void process(Iterable<File> files, Formatter formatter, UpToDateChecke
5858
problemFiles.add(file);
5959
if (buildContext.isIncremental()) {
6060
Map.Entry<String, Integer> diffEntry = DiffMessageFormatter.diff(formatter, file);
61-
buildContext.addMessage(file, diffEntry.getValue(), 0, diffEntry.getKey(), BuildContext.SEVERITY_ERROR, null);
61+
buildContext.addMessage(file, diffEntry.getValue() + 1, 0, diffEntry.getKey(), BuildContext.SEVERITY_ERROR, null);
6262
}
6363
counter.cleaned();
6464
} else {

0 commit comments

Comments
 (0)