-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for @CFLintIgnore to cfcomponent and cffunction tags. cleanup bugs - all tests passing.
- Loading branch information
1 parent
2f0fd4b
commit 36d67a4
Showing
13 changed files
with
342 additions
and
187 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/test/resources/com/cflint/tests/Ignores/ignoreCFMLComponent.cfc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!--- | ||
Test Comment | ||
---> | ||
<cfcomponent> | ||
|
||
<cffunction name="testFunction" displayname="" access="public" output="false" returntype="void" hint=""> | ||
<cfscript> | ||
someVar = ''; | ||
</cfscript> | ||
</cffunction> | ||
|
||
</cfcomponent> |
17 changes: 17 additions & 0 deletions
17
src/test/resources/com/cflint/tests/Ignores/ignoreCFMLComponent.expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[ { | ||
"severity" : "ERROR", | ||
"id" : "MISSING_VAR", | ||
"message" : "MISSING_VAR", | ||
"category" : "CFLINT", | ||
"abbrev" : "MV", | ||
"locations" : [ { | ||
"file" : "src\\test\\resources\\com\\cflint\\tests\\Ignores\\ignoreCFMLComponent.cfc", | ||
"fileName" : "ignoreCFMLComponent.cfc", | ||
"function" : "testFunction", | ||
"column" : "8", | ||
"line" : "8", | ||
"message" : "Variable someVar is not declared with a var statement.", | ||
"variable" : "someVar", | ||
"expression" : "someVar" | ||
} ] | ||
} ] |
13 changes: 13 additions & 0 deletions
13
src/test/resources/com/cflint/tests/Ignores/ignoreCFMLComponent2.cfc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!--- | ||
Test Comment | ||
@CFLintIgnore SOMETHINGELSE,MISSING_VAR,ANOTHERTHINGTOIGNORE | ||
---> | ||
<cfcomponent> | ||
|
||
<cffunction name="testFunction" displayname="" access="public" output="false" returntype="void" hint=""> | ||
<cfscript> | ||
someVar = ''; | ||
</cfscript> | ||
</cffunction> | ||
|
||
</cfcomponent> |
2 changes: 1 addition & 1 deletion
2
src/test/resources/com/cflint/tests/Ignores/ignoreMultiLine.cfc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
component { | ||
|
||
/* | ||
Test! | ||
Test! | ||
*/ | ||
public void function function1() { | ||
someVar = ''; | ||
|
18 changes: 17 additions & 1 deletion
18
src/test/resources/com/cflint/tests/Ignores/ignoreMultiLine.expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
[ ] | ||
[ { | ||
"severity" : "ERROR", | ||
"id" : "MISSING_VAR", | ||
"message" : "MISSING_VAR", | ||
"category" : "CFLINT", | ||
"abbrev" : "MV", | ||
"locations" : [ { | ||
"file" : "src\\test\\resources\\com\\cflint\\tests\\Ignores\\ignoreMultiLine.cfc", | ||
"fileName" : "ignoreMultiLine.cfc", | ||
"function" : "function1", | ||
"column" : "6", | ||
"line" : "7", | ||
"message" : "Variable someVar is not declared with a var statement.", | ||
"variable" : "someVar", | ||
"expression" : "someVar" | ||
} ] | ||
} ] |
10 changes: 10 additions & 0 deletions
10
src/test/resources/com/cflint/tests/Ignores/ignoreMultiLineComponent.cfc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
Test! | ||
*/ | ||
component { | ||
|
||
public void function function1() { | ||
someVar = ''; | ||
} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/test/resources/com/cflint/tests/Ignores/ignoreMultiLineComponent.expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[ { | ||
"severity" : "ERROR", | ||
"id" : "MISSING_VAR", | ||
"message" : "MISSING_VAR", | ||
"category" : "CFLINT", | ||
"abbrev" : "MV", | ||
"locations" : [ { | ||
"file" : "src\\test\\resources\\com\\cflint\\tests\\Ignores\\ignoreMultiLineComponent.cfc", | ||
"fileName" : "ignoreMultiLineComponent.cfc", | ||
"function" : "function1", | ||
"column" : "6", | ||
"line" : "7", | ||
"message" : "Variable someVar is not declared with a var statement.", | ||
"variable" : "someVar", | ||
"expression" : "someVar" | ||
} ] | ||
} ] |
11 changes: 11 additions & 0 deletions
11
src/test/resources/com/cflint/tests/Ignores/ignoreMultiLineComponent2.cfc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
Test! | ||
@CFLintIgnore SOMETHINGELSE,MISSING_VAR,ANOTHERTHINGTOIGNORE | ||
*/ | ||
component { | ||
|
||
public void function function1() { | ||
someVar = ''; | ||
} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/test/resources/com/cflint/tests/Ignores/ignoreMultiLineComponent2.expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[ { | ||
"severity" : "ERROR", | ||
"id" : "MISSING_VAR", | ||
"message" : "MISSING_VAR", | ||
"category" : "CFLINT", | ||
"abbrev" : "MV", | ||
"locations" : [ { | ||
"file" : "src\\test\\resources\\com\\cflint\\tests\\Ignores\\ignoreMultiLineComponent2.cfc", | ||
"fileName" : "ignoreMultiLineComponent2.cfc", | ||
"function" : "function1", | ||
"column" : "6", | ||
"line" : "8", | ||
"message" : "Variable someVar is not declared with a var statement.", | ||
"variable" : "someVar", | ||
"expression" : "someVar" | ||
} ] | ||
} ] |