Skip to content

Commit

Permalink
cflint#323 - issue 4 --- Updated all test by regenerating the results.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealAgentK committed Jul 2, 2017
1 parent 8f0fa3d commit 5e97022
Show file tree
Hide file tree
Showing 81 changed files with 1,160 additions and 593 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
[ ]
[ {
"totalfiles" : 0
}, {
"totalsize" : 0
} ]
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"category" : "CFLINT",
"abbrev" : "AU",
"locations" : [ {
"file" : "src\\test\\resources\\com\\cflint\\tests\\BuiltInFunctionChecker\\isDate1.cfm",
"file" : "src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate1.cfm",
"fileName" : "isDate1.cfm",
"function" : "foo",
"column" : 17,
Expand All @@ -14,4 +14,14 @@
"variable" : "",
"expression" : "isDate(1.5)"
} ]
}, {
"totalfiles" : 0
}, {
"totalsize" : 0
}, {
"code" : "AVOID_USING_ISDATE",
"count" : 1
}, {
"severity" : "WARNING",
"count" : 1
} ]
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"category" : "CFLINT",
"abbrev" : "AU",
"locations" : [ {
"file" : "src\\test\\resources\\com\\cflint\\tests\\BuiltInFunctionChecker\\isDate2.cfm",
"file" : "src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate2.cfm",
"fileName" : "isDate2.cfm",
"function" : "foo",
"column" : 19,
Expand All @@ -14,4 +14,14 @@
"variable" : "",
"expression" : "isDate(1.5)"
} ]
}, {
"totalfiles" : 0
}, {
"totalsize" : 0
}, {
"code" : "AVOID_USING_ISDATE",
"count" : 1
}, {
"severity" : "WARNING",
"count" : 1
} ]
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"category" : "CFLINT",
"abbrev" : "AU",
"locations" : [ {
"file" : "src\\test\\resources\\com\\cflint\\tests\\CFIncludeChecker\\cfinclude1.cfc",
"file" : "src/test/resources/com/cflint/tests/CFIncludeChecker/cfinclude1.cfc",
"fileName" : "cfinclude1.cfc",
"function" : "",
"column" : 3,
Expand All @@ -14,4 +14,14 @@
"variable" : "cfinclude",
"expression" : "<cfinclude template=\"functions.cfm\">"
} ]
}, {
"totalfiles" : 0
}, {
"totalsize" : 0
}, {
"code" : "AVOID_USING_CFINCLUDE_TAG",
"count" : 1
}, {
"severity" : "WARNING",
"count" : 1
} ]
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"category" : "CFLINT",
"abbrev" : "AU",
"locations" : [ {
"file" : "src\\test\\resources\\com\\cflint\\tests\\CFIncludeChecker\\lonelyCfinclude.cfc",
"file" : "src/test/resources/com/cflint/tests/CFIncludeChecker/lonelyCfinclude.cfc",
"fileName" : "lonelyCfinclude.cfc",
"function" : "",
"column" : 3,
Expand All @@ -14,4 +14,14 @@
"variable" : "cfinclude",
"expression" : "<cfinclude template=\"functions.cfm\">"
} ]
}, {
"totalfiles" : 0
}, {
"totalsize" : 0
}, {
"code" : "AVOID_USING_CFINCLUDE_TAG",
"count" : 1
}, {
"severity" : "WARNING",
"count" : 1
} ]
Original file line number Diff line number Diff line change
@@ -1,33 +1,43 @@
[ {
"severity" : "WARNING",
"id" : "COMPARE_INSTEAD_OF_ASSIGN",
"message" : "COMPARE_INSTEAD_OF_ASSIGN",
"category" : "CFLINT",
"abbrev" : "CI",
"locations" : [ {
"file" : "src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare1.cfm",
"fileName" : "Compare1.cfm",
"function" : "",
"column" : 5,
"line" : 5,
"message" : "CWE-482: Comparing instead of Assigning",
"variable" : "==",
"expression" : "x.x == 2"
} ]
}, {
"severity" : "WARNING",
"id" : "COMPARE_INSTEAD_OF_ASSIGN",
"message" : "COMPARE_INSTEAD_OF_ASSIGN",
"category" : "CFLINT",
"abbrev" : "CI",
"locations" : [ {
"file" : "src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare1.cfm",
"fileName" : "Compare1.cfm",
"function" : "",
"column" : 5,
"line" : 9,
"message" : "CWE-482: Comparing instead of Assigning",
"variable" : "EQ",
"expression" : "x.x EQ 6"
} ]
[ {
"severity" : "WARNING",
"id" : "COMPARE_INSTEAD_OF_ASSIGN",
"message" : "COMPARE_INSTEAD_OF_ASSIGN",
"category" : "CFLINT",
"abbrev" : "CI",
"locations" : [ {
"file" : "src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare1.cfm",
"fileName" : "Compare1.cfm",
"function" : "",
"column" : 5,
"line" : 5,
"message" : "CWE-482: Comparing instead of Assigning",
"variable" : "==",
"expression" : "x.x == 2"
} ]
}, {
"severity" : "WARNING",
"id" : "COMPARE_INSTEAD_OF_ASSIGN",
"message" : "COMPARE_INSTEAD_OF_ASSIGN",
"category" : "CFLINT",
"abbrev" : "CI",
"locations" : [ {
"file" : "src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare1.cfm",
"fileName" : "Compare1.cfm",
"function" : "",
"column" : 5,
"line" : 9,
"message" : "CWE-482: Comparing instead of Assigning",
"variable" : "EQ",
"expression" : "x.x EQ 6"
} ]
}, {
"totalfiles" : 0
}, {
"totalsize" : 0
}, {
"code" : "COMPARE_INSTEAD_OF_ASSIGN",
"count" : 2
}, {
"severity" : "WARNING",
"count" : 2
} ]
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
[ ]
[ {
"totalfiles" : 0
}, {
"totalsize" : 0
} ]
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
[ ]
[ {
"totalfiles" : 0
}, {
"totalsize" : 0
} ]
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
[ {
"severity" : "WARNING",
"id" : "FUNCTION_TOO_COMPLEX",
"message" : "FUNCTION_TOO_COMPLEX",
"category" : "CFLINT",
"abbrev" : "FT",
"locations" : [ {
"file" : "src\\test\\resources\\com\\cflint\\tests\\Complexity\\ifelseComplex.cfc",
"fileName" : "ifelseComplex.cfc",
"function" : "foo",
"column" : 0,
"line" : 2,
"message" : "Function foo is too complex. Consider breaking the function into smaller functions.",
"variable" : "",
"expression" : "if(something ) {\ndoSomethingElse();\n\n }"
} ]
[ {
"severity" : "WARNING",
"id" : "FUNCTION_TOO_COMPLEX",
"message" : "FUNCTION_TOO_COMPLEX",
"category" : "CFLINT",
"abbrev" : "FT",
"locations" : [ {
"file" : "src/test/resources/com/cflint/tests/Complexity/ifelseComplex.cfc",
"fileName" : "ifelseComplex.cfc",
"function" : "foo",
"column" : 0,
"line" : 2,
"message" : "Function foo is too complex. Consider breaking the function into smaller functions.",
"variable" : "",
"expression" : "if(something ) {\ndoSomethingElse();\n\n }"
} ]
}, {
"totalfiles" : 0
}, {
"totalsize" : 0
}, {
"code" : "FUNCTION_TOO_COMPLEX",
"count" : 1
}, {
"severity" : "WARNING",
"count" : 1
} ]
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
"line" : 1,
"message" : "Component name foo is not a valid name. Please use CamelCase and start with a capital letter.",
"variable" : "",
"expression" : "component {/n}"
"expression" : "component {\n}"
} ]
}, {
"totalfiles" : 0
}, {
"totalsize" : 0
}, {
"code" : "COMPONENT_INVALID_NAME",
"count" : 1
}, {
"severity" : "INFO",
"count" : 1
} ]
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
"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}"
"expression" : "component name='foo2' {\n}"
} ]
}, {
"totalfiles" : 0
}, {
"totalsize" : 0
}, {
"code" : "COMPONENT_INVALID_NAME",
"count" : 1
}, {
"severity" : "INFO",
"count" : 1
} ]
42 changes: 26 additions & 16 deletions src/test/resources/com/cflint/tests/EmptyFile/foo.expected.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
[ {
"severity" : "WARNING",
"id" : "AVOID_EMPTY_FILES",
"message" : "AVOID_EMPTY_FILES",
"category" : "CFLINT",
"abbrev" : "AE",
"locations" : [ {
"file" : "src\\test\\resources\\com\\cflint\\tests\\EmptyFile\\foo.cfc",
"fileName" : "foo.cfc",
"function" : "",
"column" : 1,
"line" : 1,
"message" : "CF file is empty: ${file}",
"variable" : "",
"expression" : ""
} ]
[ {
"severity" : "WARNING",
"id" : "AVOID_EMPTY_FILES",
"message" : "AVOID_EMPTY_FILES",
"category" : "CFLINT",
"abbrev" : "AE",
"locations" : [ {
"file" : "src/test/resources/com/cflint/tests/EmptyFile/foo.cfc",
"fileName" : "foo.cfc",
"function" : "",
"column" : 1,
"line" : 1,
"message" : "CF file is empty: ${file}",
"variable" : "",
"expression" : ""
} ]
}, {
"totalfiles" : 0
}, {
"totalsize" : 0
}, {
"code" : "AVOID_EMPTY_FILES",
"count" : 1
}, {
"severity" : "WARNING",
"count" : 1
} ]
42 changes: 26 additions & 16 deletions src/test/resources/com/cflint/tests/EmptyFile/fooWS.expected.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
[ {
"severity" : "WARNING",
"id" : "AVOID_EMPTY_FILES",
"message" : "AVOID_EMPTY_FILES",
"category" : "CFLINT",
"abbrev" : "AE",
"locations" : [ {
"file" : "src/test/resources/com/cflint/tests/EmptyFile/fooWS.cfc",
"fileName" : "fooWS.cfc",
"function" : "",
"column" : 1,
"line" : 1,
"message" : "CF file is empty: ${file}",
"variable" : "",
"expression" : ""
} ]
[ {
"severity" : "WARNING",
"id" : "AVOID_EMPTY_FILES",
"message" : "AVOID_EMPTY_FILES",
"category" : "CFLINT",
"abbrev" : "AE",
"locations" : [ {
"file" : "src/test/resources/com/cflint/tests/EmptyFile/fooWS.cfc",
"fileName" : "fooWS.cfc",
"function" : "",
"column" : 1,
"line" : 1,
"message" : "CF file is empty: ${file}",
"variable" : "",
"expression" : ""
} ]
}, {
"totalfiles" : 0
}, {
"totalsize" : 0
}, {
"code" : "AVOID_EMPTY_FILES",
"count" : 1
}, {
"severity" : "WARNING",
"count" : 1
} ]
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
[ ]
[ {
"totalfiles" : 0
}, {
"totalsize" : 0
} ]
Loading

0 comments on commit 5e97022

Please sign in to comment.