Fix more tests
This commit is contained in:
@ -35,7 +35,7 @@ public class AvoidTabCharacterRule extends AbstractPLSQLRule {
|
||||
while ((line = in.readLine()) != null) {
|
||||
lineNumber++;
|
||||
if (line.indexOf('\t') != -1) {
|
||||
addViolationWithMessage(data, null, "Tab characters are not allowed. Use spaces for indentation",
|
||||
addViolationWithMessage(data, node, "Tab characters are not allowed. Use spaces for indentation",
|
||||
lineNumber, lineNumber);
|
||||
|
||||
if (!eachLine) {
|
||||
|
@ -43,7 +43,7 @@ public class LineLengthRule extends AbstractPLSQLRule {
|
||||
while ((line = in.readLine()) != null) {
|
||||
lineNumber++;
|
||||
if (line.length() > maxLineLength) {
|
||||
addViolationWithMessage(data, null, "The line is too long. Only " + maxLineLength + " characters are allowed.",
|
||||
addViolationWithMessage(data, node, "The line is too long. Only " + maxLineLength + " characters are allowed.",
|
||||
lineNumber, lineNumber);
|
||||
|
||||
if (!eachLine) {
|
||||
|
@ -59,6 +59,7 @@ public class PLSQLXPathRuleTest extends AbstractPLSQLParserTst {
|
||||
rule.setMessage("Test Violation");
|
||||
|
||||
RuleContext ctx = new RuleContext();
|
||||
ctx.setCurrentRule(rule);
|
||||
ctx.setLanguageVersion(plsql.getDefaultVersion());
|
||||
|
||||
rule.apply(singletonList(node), ctx);
|
||||
|
Reference in New Issue
Block a user