Skip to content

Commit 217e863

Browse files
authored
Remove unused imports and variables (#289)
(reported by Haxe 3.3.0 / vshaxe)
1 parent d7ed597 commit 217e863

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+0
-199
lines changed

src/checkstyle/Checker.hx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,11 @@ class Checker {
104104

105105
function makeLines() {
106106
var code = file.content;
107-
var left = false;
108-
var s = 0;
109107
lines = code.split(lineSeparator);
110108
}
111109

112110
function makeTokens() {
113111
try {
114-
var code = file.content;
115112
tokens = [];
116113
tokenTree = null;
117114
var lexer = new HaxeLexer(bytes, file.name);

src/checkstyle/Main.hx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import sys.FileSystem;
1818
import sys.io.File;
1919

2020
using checkstyle.utils.ArrayUtils;
21-
using checkstyle.utils.StringUtils;
2221

2322
class Main {
2423

src/checkstyle/checks/Check.hx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
package checkstyle.checks;
22

3-
import haxe.macro.Expr.Position;
43
import haxe.macro.Expr;
54
import checkstyle.CheckMessage.SeverityLevel;
6-
import haxeparser.Data;
75

86
#if debug
97
import haxe.CallStack;

src/checkstyle/checks/block/EmptyBlockCheck.hx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package checkstyle.checks.block;
22

33
import checkstyle.token.TokenTree;
4-
import haxeparser.Data;
5-
import haxe.macro.Expr;
64

75
using checkstyle.utils.ArrayUtils;
86

src/checkstyle/checks/block/LeftCurlyCheck.hx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package checkstyle.checks.block;
22

33
import checkstyle.token.TokenTree;
4-
import haxeparser.Data;
54
import haxe.macro.Expr;
65

76
using checkstyle.utils.ArrayUtils;
@@ -170,8 +169,6 @@ class LeftCurlyCheck extends Check {
170169
}
171170

172171
function checkLeftCurly(line:String, wrapped:Bool = false, pos:Position) {
173-
var lineLength:Int = line.length;
174-
175172
// must have at least one non whitespace character before curly
176173
// and only whitespace, /* + comment or // + comment after curly
177174
var curlyAtEOL:Bool = ~/^\s*\S.*\{\s*(|\/\*.*|\/\/.*)$/.match(line);

src/checkstyle/checks/block/NeedBracesCheck.hx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package checkstyle.checks.block;
33
import checkstyle.Checker.LinePos;
44
import checkstyle.token.TokenTree;
55
import haxeparser.Data;
6-
import haxe.macro.Expr;
76

87
using checkstyle.utils.ArrayUtils;
98

src/checkstyle/checks/block/RightCurlyCheck.hx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package checkstyle.checks.block;
22

33
import checkstyle.Checker.LinePos;
44
import checkstyle.token.TokenTree;
5-
import haxeparser.Data;
65
import haxe.macro.Expr;
76

87
using checkstyle.utils.ArrayUtils;

src/checkstyle/checks/coding/HiddenFieldCheck.hx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
package checkstyle.checks.coding;
22

33
import checkstyle.token.TokenTree;
4-
import haxeparser.Data.TokenDef;
54

65
using checkstyle.utils.ArrayUtils;
7-
using checkstyle.utils.FieldUtils;
86

97
@name("HiddenField")
108
@desc("Checks that a local variable or a parameter does not shadow a field that is defined in the same class.")

src/checkstyle/checks/coding/InnerAssignmentCheck.hx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package checkstyle.checks.coding;
22

33
import checkstyle.token.TokenTree;
4-
import haxe.macro.Expr;
54
import haxeparser.Data.TokenDef;
65

76
@name("InnerAssignment")
@@ -32,7 +31,6 @@ class InnerAssignmentCheck extends Check {
3231
Binop(OpAssignOp(OpOr)),
3332
Binop(OpAssignOp(OpXor))
3433
], ALL);
35-
var x:Int = 0;
3634
for (assignToken in allAssignments) {
3735
if (isPosSuppressed(assignToken.pos) || !filterAssignment(assignToken)) continue;
3836
logPos("Inner assignment detected", assignToken.pos);

src/checkstyle/checks/coding/NestedForDepthCheck.hx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package checkstyle.checks.coding;
22

3-
import haxeparser.Data;
43
import haxe.macro.Expr;
54

65
@name("NestedForDepth")

0 commit comments

Comments
 (0)