added column number to tab check

This commit is contained in:
Lars Kühne 2002-05-01 08:31:27 +00:00
parent ff08629ef8
commit 83a1c2d3b3
2 changed files with 6 additions and 3 deletions

View File

@ -192,8 +192,11 @@ class Verifier
" characters");
}
if (!mConfig.isAllowTabs() && (mLines[i].indexOf('\t') != -1)) {
log(i + 1, "line contains a tab character");
if (!mConfig.isAllowTabs()) {
final int tabPosition = mLines[i].indexOf('\t');
if (tabPosition != -1) {
log(i + 1, tabPosition, "line contains a tab character");
}
}
}

View File

@ -377,7 +377,7 @@ public class CheckerTest
filepath + ":1: file length is 146 lines (max allowed is 20).",
filepath + ":3: Line does not match expected header line of '// Created: 2001'.",
filepath + ":18: line longer than 80 characters",
filepath + ":19: line contains a tab character",
filepath + ":19:25: line contains a tab character",
filepath + ":25:29: variable 'badConstant' must match pattern '^[A-Z](_?[A-Z0-9]+)*$'.",
filepath + ":30:24: variable 'badStatic' must match pattern '^s[A-Z][a-zA-Z0-9]*$'.",
filepath + ":35:17: variable 'badMember' must match pattern '^m[A-Z][a-zA-Z0-9]*$'.",