-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed #248, set component name correctly in the context.
- Loading branch information
1 parent
1c3c2d5
commit 997d4c0
Showing
8 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
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
37 changes: 37 additions & 0 deletions
37
src/test/resources/com/cflint/tests/ComponentNameChecker/.cflintrc
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,37 @@ | ||
{ | ||
"output" : [ ], | ||
"rule" : [ ], | ||
"excludes" : [ ], | ||
"includes" : [ { | ||
"code" : "COMPONENT_INVALID_NAME", | ||
"messageText" : null, | ||
"severity" : null | ||
},{ | ||
"code" : "COMPONENT_ALLCAPS_NAME", | ||
"messageText" : null, | ||
"severity" : null | ||
},{ | ||
"code" : "COMPONENT_TOO_SHORT", | ||
"messageText" : null, | ||
"severity" : null | ||
},{ | ||
"code" : "COMPONENT_TOO_LONG", | ||
"messageText" : null, | ||
"severity" : null | ||
},{ | ||
"code" : "COMPONENT_TOO_WORDY", | ||
"messageText" : null, | ||
"severity" : null | ||
},{ | ||
"code" : "COMPONENT_IS_TEMPORARY", | ||
"messageText" : null, | ||
"severity" : null | ||
},{ | ||
"code" : "COMPONENT_HAS_PREFIX_OR_POSTFIX", | ||
"messageText" : null, | ||
"severity" : null | ||
} | ||
], | ||
"inheritParent" : false, | ||
"inheritPlugins" : true | ||
} |
2 changes: 2 additions & 0 deletions
2
src/test/resources/com/cflint/tests/ComponentNameChecker/foo.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,2 @@ | ||
component { | ||
} |
17 changes: 17 additions & 0 deletions
17
src/test/resources/com/cflint/tests/ComponentNameChecker/foo.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" : "INFO", | ||
"id" : "COMPONENT_INVALID_NAME", | ||
"message" : "COMPONENT_INVALID_NAME", | ||
"category" : "CFLINT", | ||
"abbrev" : "CI", | ||
"locations" : [ { | ||
"file" : "src\\test\\resources\\com\\cflint\\tests\\ComponentNameChecker\\foo.cfc", | ||
"fileName" : "foo.cfc", | ||
"function" : "", | ||
"column" : "0", | ||
"line" : "1", | ||
"message" : "Component name ${component} is not a valid name. Please use CamelCase and start with a capital letter.", | ||
"variable" : "", | ||
"expression" : "component {\n}" | ||
} ] | ||
} ] |
2 changes: 2 additions & 0 deletions
2
src/test/resources/com/cflint/tests/ComponentNameChecker/foofoo.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,2 @@ | ||
component name="foo2"{ | ||
} |
17 changes: 17 additions & 0 deletions
17
src/test/resources/com/cflint/tests/ComponentNameChecker/foofoo.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" : "INFO", | ||
"id" : "COMPONENT_INVALID_NAME", | ||
"message" : "COMPONENT_INVALID_NAME", | ||
"category" : "CFLINT", | ||
"abbrev" : "CI", | ||
"locations" : [ { | ||
"file" : "src/test/resources/com/cflint/tests/ComponentNameChecker/foofoo.cfc", | ||
"fileName" : "foofoo.cfc", | ||
"function" : "", | ||
"column" : "0", | ||
"line" : "1", | ||
"message" : "Component name 'foo2' is not a valid name. Please use CamelCase and start with a capital letter.", | ||
"variable" : "", | ||
"expression" : "component name='foo2' {/n}" | ||
} ] | ||
} ] |