Skip to content

Commit a3d4d01

Browse files
committed
reduced default line length check to 160
1 parent 0cadf5d commit a3d4d01

File tree

6 files changed

+8
-5
lines changed

6 files changed

+8
-5
lines changed

checkstyle/checks/LineLengthCheck.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class LineLengthCheck extends Check {
1111

1212
public function new() {
1313
super();
14-
maxCharacters = 200;
14+
maxCharacters = 160;
1515
}
1616

1717
override function actualRun() {

checkstyle/checks/OverrideCheck.hx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ class OverrideCheck extends Check {
2020

2121
function overrideCheck(f:Field) {
2222
if (f.access.indexOf(AOverride) > 0) {
23-
logPos('override access modifier should be the at the start of the function for better code readability: ${f.name}', f.pos, Reflect.field(SeverityLevel, severity));
23+
logPos('override access modifier should be the at the start of the function for better code readability: ${f.name}',
24+
f.pos, Reflect.field(SeverityLevel, severity));
2425
}
2526
}
2627
}

checkstyle/checks/TabForAligningCheck.hx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ class TabForAligningCheck extends Check {
1010
var re = ~/^\s*\S[^\t]*\t/;
1111
for (i in 0 ... checker.lines.length) {
1212
var line = checker.lines[i];
13-
if (re.match(line) && line.indexOf("//") == -1) log("Tab after non-space character. Use space for aligning", i + 1, line.length, Reflect.field(SeverityLevel, severity));
13+
if (re.match(line) && line.indexOf("//") == -1) {
14+
log("Tab after non-space character. Use space for aligning", i + 1, line.length, Reflect.field(SeverityLevel, severity));
15+
}
1416
}
1517
}
1618
}

resources/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"type": "LineLength",
9494
"props": {
9595
"severity": "ERROR",
96-
"maxCharacters": 200
96+
"maxCharacters": 160
9797
}
9898
},
9999
{

run.n

4 Bytes
Binary file not shown.

test/LineLengthCheckTest.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class LineLengthCheckTest extends CheckTestCase {
66

77
public function testDefaultLineLength() {
88
var msg = checkMessage(LineLengthTests.TEST1, new LineLengthCheck());
9-
assertEquals(msg, 'Too long line (> 200)');
9+
assertEquals(msg, 'Too long line (> 160)');
1010
}
1111

1212
public function testCorrectLineLength() {

0 commit comments

Comments
 (0)