From 5e97022906ac6006680e5e666bfaca0d84af203d Mon Sep 17 00:00:00 2001 From: Kai Koenig Date: Sun, 2 Jul 2017 15:59:18 +1200 Subject: [PATCH] #323 - issue 4 --- Updated all test by regenerating the results. --- .../mixedScopeExample.expected.txt | 6 +- .../isDate1.expected.txt | 12 +- .../isDate2.expected.txt | 12 +- .../CFIncludeChecker/cfinclude1.expected.txt | 12 +- .../lonelyCfinclude.expected.txt | 12 +- .../Compare1.expected.txt | 74 ++++++------ .../Compare2.expected.txt | 6 +- .../tests/Complexity/ifelse.expected.txt | 6 +- .../Complexity/ifelseComplex.expected.txt | 42 ++++--- .../ComponentNameChecker/foo.expected.txt | 12 +- .../ComponentNameChecker/foofoo.expected.txt | 12 +- .../cflint/tests/EmptyFile/foo.expected.txt | 42 ++++--- .../cflint/tests/EmptyFile/fooWS.expected.txt | 42 ++++--- .../tests/ExcludesAll/someErrors.expected.txt | 6 +- .../Any/functionany1.expected.txt | 42 ++++--- .../Any/functionmissing1.expected.txt | 6 +- .../GlobalVarChecker/cfcatch_tag.expected.txt | 6 +- .../Hints/arg_hints_missing.expected.txt | 6 +- .../cflint/tests/Hints/hints1.expected.txt | 42 ++++--- .../Hints/hints2_hintattribute.expected.txt | 6 +- .../Hints/hints3_hintannotation.expected.txt | 6 +- .../Hints/hints4_emptycomment.expected.txt | 80 +++++++------ .../tests/Hints/hints5_comment.expected.txt | 6 +- .../tests/Ignores/ignoreCFMLAny1.expected.txt | 6 +- .../tests/Ignores/ignoreCFMLAny2.expected.txt | 42 ++++--- .../ignoreCFMLAny3_Nested.expected.txt | 6 +- .../tests/Ignores/ignoreCFMLAny4.expected.txt | 6 +- .../tests/Ignores/ignoreCFMLAny5.expected.txt | 6 +- .../Ignores/ignoreCFMLComponent.expected.txt | 42 ++++--- .../Ignores/ignoreCFMLComponent2.expected.txt | 6 +- .../Ignores/ignoreCFMLFunction.expected.txt | 6 +- .../tests/Ignores/ignoreLine1.expected.txt | 6 +- .../Ignores/ignoreLineMessage1.expected.txt | 6 +- .../ignoreLineMessageUnmatched.expected.txt | 42 ++++--- .../Ignores/ignoreMultiLine.expected.txt | 42 ++++--- .../Ignores/ignoreMultiLine2.expected.txt | 6 +- .../ignoreMultiLineComponent.expected.txt | 42 ++++--- .../ignoreMultiLineComponent2.expected.txt | 6 +- .../literal_checker_326.expected.txt | 74 ++++++------ .../missingSemis1.expected.txt | 42 ++++--- .../nameEndsInNumberScript.expected.txt | 10 ++ .../cflint/tests/Naming/tempVar.expected.txt | 10 ++ .../PackageCase/packagecase_nok.expected.txt | 42 ++++--- .../PackageCase/packagecase_nokC.expected.txt | 42 ++++--- .../packagecase_nok_b.expected.txt | 42 ++++--- .../PackageCase/packagecase_ok.expected.txt | 6 +- .../tests/Parsing/Underscore.expected.txt | 6 +- .../tests/Parsing/parsing253.expected.txt | 42 ++++--- .../tests/Query/cfquery_param.expected.txt | 6 +- .../tests/Query/cfquery_param2.expected.txt | 6 +- .../tests/Query/cfquery_param3.expected.txt | 42 ++++--- .../Query/cfquery_param_byline.expected.txt | 42 ++++--- .../quotedStructKey2.expected.txt | 6 +- .../unquotedStructKey.expected.txt | 42 ++++--- .../unquotedStructKeyNested.expected.txt | 42 ++++--- .../UnusedArgument_152.expected.txt | 6 +- .../UnusedArgument_152b.expected.txt | 42 ++++--- .../UnusedArgument_227.expected.txt | 6 +- .../UnusedArgument_257.expected.txt | 6 +- .../UnusedArgument_257b.expected.txt | 6 +- .../UnusedArgument_Case_234.expected.txt | 6 +- .../caselessVariable_242.expected.txt | 6 +- .../UnusedVariable/forLoop_211.expected.txt | 6 +- .../UnusedVariable/forLoop_227.expected.txt | 6 +- .../UnusedVariable/simpleUnused.expected.txt | 12 +- .../VarScoper/cfquery_scoper.expected.txt | 42 ++++--- .../cflint/tests/VarScoper/cftry.expected.txt | 106 ++++++++++-------- .../tests/VarScoper/local_256.expected.txt | 6 +- .../tests/VarScoper/namedArgs.expected.txt | 6 +- .../tests/VarScoper/property_246.expected.txt | 6 +- .../tests/VarScoper/pureScript.expected.txt | 42 ++++--- .../VarScoper/scriptSample186.expected.txt | 74 ++++++------ .../VarScoper/structassignment.expected.txt | 6 +- .../VarScoper/structureKeys_197.expected.txt | 6 +- .../VarScoper/structure_keys_197.expected.txt | 6 +- .../tests/VarScoper/testParse.expected.txt | 6 +- .../VariableNameChecker/cftry.expected.txt | 13 +++ .../sample1_228.expected.txt | 10 ++ .../sample_239.expected.txt | 6 +- .../WriteDumpChecker/writeDump.expected.txt | 42 ++++--- .../tests/parsing/parsing251.expected.txt | 6 +- 81 files changed, 1160 insertions(+), 593 deletions(-) diff --git a/src/test/resources/com/cflint/tests/ArgVarConflict/mixedScopeExample.expected.txt b/src/test/resources/com/cflint/tests/ArgVarConflict/mixedScopeExample.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/ArgVarConflict/mixedScopeExample.expected.txt +++ b/src/test/resources/com/cflint/tests/ArgVarConflict/mixedScopeExample.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate1.expected.txt b/src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate1.expected.txt index 2bea47c63..6d7c29fee 100644 --- a/src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate1.expected.txt +++ b/src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate1.expected.txt @@ -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, @@ -14,4 +14,14 @@ "variable" : "", "expression" : "isDate(1.5)" } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "AVOID_USING_ISDATE", + "count" : 1 +}, { + "severity" : "WARNING", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate2.expected.txt b/src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate2.expected.txt index 96279e876..d675fc494 100644 --- a/src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate2.expected.txt +++ b/src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate2.expected.txt @@ -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, @@ -14,4 +14,14 @@ "variable" : "", "expression" : "isDate(1.5)" } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "AVOID_USING_ISDATE", + "count" : 1 +}, { + "severity" : "WARNING", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/CFIncludeChecker/cfinclude1.expected.txt b/src/test/resources/com/cflint/tests/CFIncludeChecker/cfinclude1.expected.txt index 6677d32ef..f4e8fc238 100644 --- a/src/test/resources/com/cflint/tests/CFIncludeChecker/cfinclude1.expected.txt +++ b/src/test/resources/com/cflint/tests/CFIncludeChecker/cfinclude1.expected.txt @@ -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, @@ -14,4 +14,14 @@ "variable" : "cfinclude", "expression" : "" } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "AVOID_USING_CFINCLUDE_TAG", + "count" : 1 +}, { + "severity" : "WARNING", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/CFIncludeChecker/lonelyCfinclude.expected.txt b/src/test/resources/com/cflint/tests/CFIncludeChecker/lonelyCfinclude.expected.txt index 64eee24e3..94f451d63 100644 --- a/src/test/resources/com/cflint/tests/CFIncludeChecker/lonelyCfinclude.expected.txt +++ b/src/test/resources/com/cflint/tests/CFIncludeChecker/lonelyCfinclude.expected.txt @@ -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, @@ -14,4 +14,14 @@ "variable" : "cfinclude", "expression" : "" } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "AVOID_USING_CFINCLUDE_TAG", + "count" : 1 +}, { + "severity" : "WARNING", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare1.expected.txt b/src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare1.expected.txt index b0cc2f581..f90608631 100644 --- a/src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare1.expected.txt +++ b/src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare1.expected.txt @@ -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 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare2.expected.txt b/src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare2.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare2.expected.txt +++ b/src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare2.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Complexity/ifelse.expected.txt b/src/test/resources/com/cflint/tests/Complexity/ifelse.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Complexity/ifelse.expected.txt +++ b/src/test/resources/com/cflint/tests/Complexity/ifelse.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Complexity/ifelseComplex.expected.txt b/src/test/resources/com/cflint/tests/Complexity/ifelseComplex.expected.txt index df4401846..6daef50cf 100644 --- a/src/test/resources/com/cflint/tests/Complexity/ifelseComplex.expected.txt +++ b/src/test/resources/com/cflint/tests/Complexity/ifelseComplex.expected.txt @@ -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 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/ComponentNameChecker/foo.expected.txt b/src/test/resources/com/cflint/tests/ComponentNameChecker/foo.expected.txt index eef7baccb..f08af2c70 100644 --- a/src/test/resources/com/cflint/tests/ComponentNameChecker/foo.expected.txt +++ b/src/test/resources/com/cflint/tests/ComponentNameChecker/foo.expected.txt @@ -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 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/ComponentNameChecker/foofoo.expected.txt b/src/test/resources/com/cflint/tests/ComponentNameChecker/foofoo.expected.txt index 7c7389b3a..c507ec536 100644 --- a/src/test/resources/com/cflint/tests/ComponentNameChecker/foofoo.expected.txt +++ b/src/test/resources/com/cflint/tests/ComponentNameChecker/foofoo.expected.txt @@ -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 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/EmptyFile/foo.expected.txt b/src/test/resources/com/cflint/tests/EmptyFile/foo.expected.txt index 72f7dea7d..650c51d44 100644 --- a/src/test/resources/com/cflint/tests/EmptyFile/foo.expected.txt +++ b/src/test/resources/com/cflint/tests/EmptyFile/foo.expected.txt @@ -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 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/EmptyFile/fooWS.expected.txt b/src/test/resources/com/cflint/tests/EmptyFile/fooWS.expected.txt index 329ab38a9..b873b2fb6 100644 --- a/src/test/resources/com/cflint/tests/EmptyFile/fooWS.expected.txt +++ b/src/test/resources/com/cflint/tests/EmptyFile/fooWS.expected.txt @@ -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 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/ExcludesAll/someErrors.expected.txt b/src/test/resources/com/cflint/tests/ExcludesAll/someErrors.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/ExcludesAll/someErrors.expected.txt +++ b/src/test/resources/com/cflint/tests/ExcludesAll/someErrors.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/FunctionType/Any/functionany1.expected.txt b/src/test/resources/com/cflint/tests/FunctionType/Any/functionany1.expected.txt index 26b03638a..938f86ea0 100644 --- a/src/test/resources/com/cflint/tests/FunctionType/Any/functionany1.expected.txt +++ b/src/test/resources/com/cflint/tests/FunctionType/Any/functionany1.expected.txt @@ -1,17 +1,27 @@ -[ { - "severity" : "INFO", - "id" : "FUNCTION_TYPE_ANY", - "message" : "FUNCTION_TYPE_ANY", - "category" : "CFLINT", - "abbrev" : "FT", - "locations" : [ { - "file" : "src\\test\\resources\\com\\cflint\\tests\\FunctionType\\Any\\functionany1.cfc", - "fileName" : "functionany1.cfc", - "function" : "x", - "column" : 11, - "line" : 3, - "message" : "Function x return type is any. Please change to be the correct type.", - "variable" : "x", - "expression" : "public any function x() {\nx = 123;\n\n }" - } ] +[ { + "severity" : "INFO", + "id" : "FUNCTION_TYPE_ANY", + "message" : "FUNCTION_TYPE_ANY", + "category" : "CFLINT", + "abbrev" : "FT", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/FunctionType/Any/functionany1.cfc", + "fileName" : "functionany1.cfc", + "function" : "x", + "column" : 11, + "line" : 3, + "message" : "Function x return type is any. Please change to be the correct type.", + "variable" : "x", + "expression" : "public any function x() {\nx = 123;\n\n }" + } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "FUNCTION_TYPE_ANY", + "count" : 1 +}, { + "severity" : "INFO", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/FunctionType/Any/functionmissing1.expected.txt b/src/test/resources/com/cflint/tests/FunctionType/Any/functionmissing1.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/FunctionType/Any/functionmissing1.expected.txt +++ b/src/test/resources/com/cflint/tests/FunctionType/Any/functionmissing1.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/GlobalVarChecker/cfcatch_tag.expected.txt b/src/test/resources/com/cflint/tests/GlobalVarChecker/cfcatch_tag.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/GlobalVarChecker/cfcatch_tag.expected.txt +++ b/src/test/resources/com/cflint/tests/GlobalVarChecker/cfcatch_tag.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Hints/arg_hints_missing.expected.txt b/src/test/resources/com/cflint/tests/Hints/arg_hints_missing.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Hints/arg_hints_missing.expected.txt +++ b/src/test/resources/com/cflint/tests/Hints/arg_hints_missing.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Hints/hints1.expected.txt b/src/test/resources/com/cflint/tests/Hints/hints1.expected.txt index 56528061d..ec930640f 100644 --- a/src/test/resources/com/cflint/tests/Hints/hints1.expected.txt +++ b/src/test/resources/com/cflint/tests/Hints/hints1.expected.txt @@ -1,17 +1,27 @@ -[ { - "severity" : "WARNING", - "id" : "COMPONENT_HINT_MISSING", - "message" : "COMPONENT_HINT_MISSING", - "category" : "CFLINT", - "abbrev" : "CH", - "locations" : [ { - "file" : "src\\test\\resources\\com\\cflint\\tests\\Hints\\hints1.cfc", - "fileName" : "hints1.cfc", - "function" : "", - "column" : 1, - "line" : 1, - "message" : "Component hints1 is missing a hint.", - "variable" : "hints1", - "expression" : "component {/n public void function function1(arg1, arg2) hint='test hint attribute' {/nsomeVar = '';/n/n }/n}" - } ] +[ { + "severity" : "WARNING", + "id" : "COMPONENT_HINT_MISSING", + "message" : "COMPONENT_HINT_MISSING", + "category" : "CFLINT", + "abbrev" : "CH", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/Hints/hints1.cfc", + "fileName" : "hints1.cfc", + "function" : "", + "column" : 1, + "line" : 1, + "message" : "Component hints1 is missing a hint.", + "variable" : "hints1", + "expression" : "component {\n public void function function1(arg1, arg2) hint='test hint attribute' {\nsomeVar = '';\n\n }\n}" + } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "COMPONENT_HINT_MISSING", + "count" : 1 +}, { + "severity" : "WARNING", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Hints/hints2_hintattribute.expected.txt b/src/test/resources/com/cflint/tests/Hints/hints2_hintattribute.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Hints/hints2_hintattribute.expected.txt +++ b/src/test/resources/com/cflint/tests/Hints/hints2_hintattribute.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Hints/hints3_hintannotation.expected.txt b/src/test/resources/com/cflint/tests/Hints/hints3_hintannotation.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Hints/hints3_hintannotation.expected.txt +++ b/src/test/resources/com/cflint/tests/Hints/hints3_hintannotation.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Hints/hints4_emptycomment.expected.txt b/src/test/resources/com/cflint/tests/Hints/hints4_emptycomment.expected.txt index 353290dd2..53a9c427d 100644 --- a/src/test/resources/com/cflint/tests/Hints/hints4_emptycomment.expected.txt +++ b/src/test/resources/com/cflint/tests/Hints/hints4_emptycomment.expected.txt @@ -1,33 +1,49 @@ -[ { - "severity" : "WARNING", - "id" : "COMPONENT_HINT_MISSING", - "message" : "COMPONENT_HINT_MISSING", - "category" : "CFLINT", - "abbrev" : "CH", - "locations" : [ { - "file" : "src\\test\\resources\\com\\cflint\\tests\\Hints\\hints4_emptycomment.cfc", - "fileName" : "hints4_emptycomment.cfc", - "function" : "", - "column" : 1, - "line" : 4, - "message" : "Component hints4_emptycomment is missing a hint.", - "variable" : "hints4_emptycomment", - "expression" : "component {\n public void function function1() {\nsomeVar = '';\n\n }\n}" - } ] -}, { - "severity" : "INFO", - "id" : "FUNCTION_HINT_MISSING", - "message" : "FUNCTION_HINT_MISSING", - "category" : "CFLINT", - "abbrev" : "FH", - "locations" : [ { - "file" : "src\\test\\resources\\com\\cflint\\tests\\Hints\\hints4_emptycomment.cfc", - "fileName" : "hints4_emptycomment.cfc", - "function" : "function1", - "column" : 13, - "line" : 9, - "message" : "Function function1 is missing a hint.", - "variable" : "function1", - "expression" : "public void function function1() {\nsomeVar = '';\n\n }" - } ] +[ { + "severity" : "WARNING", + "id" : "COMPONENT_HINT_MISSING", + "message" : "COMPONENT_HINT_MISSING", + "category" : "CFLINT", + "abbrev" : "CH", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/Hints/hints4_emptycomment.cfc", + "fileName" : "hints4_emptycomment.cfc", + "function" : "", + "column" : 1, + "line" : 4, + "message" : "Component hints4_emptycomment is missing a hint.", + "variable" : "hints4_emptycomment", + "expression" : "component {\n public void function function1() {\nsomeVar = '';\n\n }\n}" + } ] +}, { + "severity" : "INFO", + "id" : "FUNCTION_HINT_MISSING", + "message" : "FUNCTION_HINT_MISSING", + "category" : "CFLINT", + "abbrev" : "FH", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/Hints/hints4_emptycomment.cfc", + "fileName" : "hints4_emptycomment.cfc", + "function" : "function1", + "column" : 13, + "line" : 9, + "message" : "Function function1 is missing a hint.", + "variable" : "function1", + "expression" : "public void function function1() {\nsomeVar = '';\n\n }" + } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "COMPONENT_HINT_MISSING", + "count" : 1 +}, { + "code" : "FUNCTION_HINT_MISSING", + "count" : 1 +}, { + "severity" : "WARNING", + "count" : 1 +}, { + "severity" : "INFO", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Hints/hints5_comment.expected.txt b/src/test/resources/com/cflint/tests/Hints/hints5_comment.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Hints/hints5_comment.expected.txt +++ b/src/test/resources/com/cflint/tests/Hints/hints5_comment.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny1.expected.txt b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny1.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny1.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny1.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny2.expected.txt b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny2.expected.txt index ddc612b4a..0a2a9ca11 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny2.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny2.expected.txt @@ -1,17 +1,27 @@ -[ { - "severity" : "ERROR", - "id" : "MISSING_VAR", - "message" : "MISSING_VAR", - "category" : "CFLINT", - "abbrev" : "MV", - "locations" : [ { - "file" : "src\\test\\resources\\com\\cflint\\tests\\Ignores\\ignoreCFMLAny2.cfc", - "fileName" : "ignoreCFMLAny2.cfc", - "function" : "testFunction", - "column" : 6, - "line" : 14, - "message" : "Variable someVar is not declared with a var statement.", - "variable" : "someVar", - "expression" : "someVar" - } ] +[ { + "severity" : "ERROR", + "id" : "MISSING_VAR", + "message" : "MISSING_VAR", + "category" : "CFLINT", + "abbrev" : "MV", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny2.cfc", + "fileName" : "ignoreCFMLAny2.cfc", + "function" : "testFunction", + "column" : 6, + "line" : 14, + "message" : "Variable someVar is not declared with a var statement.", + "variable" : "someVar", + "expression" : "someVar" + } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "MISSING_VAR", + "count" : 1 +}, { + "severity" : "ERROR", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny3_Nested.expected.txt b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny3_Nested.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny3_Nested.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny3_Nested.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny4.expected.txt b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny4.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny4.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny4.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny5.expected.txt b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny5.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny5.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny5.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLComponent.expected.txt b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLComponent.expected.txt index a1b5fe4ed..2a3a26ab5 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLComponent.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLComponent.expected.txt @@ -1,17 +1,27 @@ -[ { - "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" : 6, - "line" : 8, - "message" : "Variable someVar is not declared with a var statement.", - "variable" : "someVar", - "expression" : "someVar" - } ] +[ { + "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" : 6, + "line" : 8, + "message" : "Variable someVar is not declared with a var statement.", + "variable" : "someVar", + "expression" : "someVar" + } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "MISSING_VAR", + "count" : 1 +}, { + "severity" : "ERROR", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLComponent2.expected.txt b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLComponent2.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLComponent2.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLComponent2.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLFunction.expected.txt b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLFunction.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLFunction.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLFunction.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Ignores/ignoreLine1.expected.txt b/src/test/resources/com/cflint/tests/Ignores/ignoreLine1.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreLine1.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreLine1.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Ignores/ignoreLineMessage1.expected.txt b/src/test/resources/com/cflint/tests/Ignores/ignoreLineMessage1.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreLineMessage1.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreLineMessage1.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Ignores/ignoreLineMessageUnmatched.expected.txt b/src/test/resources/com/cflint/tests/Ignores/ignoreLineMessageUnmatched.expected.txt index 81fbbfcb9..0301a9287 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreLineMessageUnmatched.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreLineMessageUnmatched.expected.txt @@ -1,17 +1,27 @@ -[ { - "severity" : "ERROR", - "id" : "MISSING_VAR", - "message" : "MISSING_VAR", - "category" : "CFLINT", - "abbrev" : "MV", - "locations" : [ { - "file" : "src\\test\\resources\\com\\cflint\\tests\\Ignores\\ignoreLineMessageUnmatched.cfc", - "fileName" : "ignoreLineMessageUnmatched.cfc", - "function" : "function1", - "column" : 6, - "line" : 4, - "message" : "Variable someVar is not declared with a var statement.", - "variable" : "someVar", - "expression" : "someVar" - } ] +[ { + "severity" : "ERROR", + "id" : "MISSING_VAR", + "message" : "MISSING_VAR", + "category" : "CFLINT", + "abbrev" : "MV", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/Ignores/ignoreLineMessageUnmatched.cfc", + "fileName" : "ignoreLineMessageUnmatched.cfc", + "function" : "function1", + "column" : 6, + "line" : 4, + "message" : "Variable someVar is not declared with a var statement.", + "variable" : "someVar", + "expression" : "someVar" + } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "MISSING_VAR", + "count" : 1 +}, { + "severity" : "ERROR", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLine.expected.txt b/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLine.expected.txt index b458ac699..c844511ae 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLine.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLine.expected.txt @@ -1,17 +1,27 @@ -[ { - "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" - } ] +[ { + "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" + } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "MISSING_VAR", + "count" : 1 +}, { + "severity" : "ERROR", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLine2.expected.txt b/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLine2.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLine2.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLine2.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLineComponent.expected.txt b/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLineComponent.expected.txt index 1fd21f106..10059053d 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLineComponent.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLineComponent.expected.txt @@ -1,17 +1,27 @@ -[ { - "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" - } ] +[ { + "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" + } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "MISSING_VAR", + "count" : 1 +}, { + "severity" : "ERROR", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLineComponent2.expected.txt b/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLineComponent2.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLineComponent2.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLineComponent2.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/LiteralChecker/literal_checker_326.expected.txt b/src/test/resources/com/cflint/tests/LiteralChecker/literal_checker_326.expected.txt index ecd5061c3..017652786 100644 --- a/src/test/resources/com/cflint/tests/LiteralChecker/literal_checker_326.expected.txt +++ b/src/test/resources/com/cflint/tests/LiteralChecker/literal_checker_326.expected.txt @@ -1,33 +1,43 @@ -[ { - "severity" : "WARNING", - "id" : "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN", - "message" : "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN", - "category" : "CFLINT", - "abbrev" : "GL", - "locations" : [ { - "file" : "src\\test\\resources\\com\\cflint\\tests\\LiteralChecker\\literal_checker_326.cfm", - "fileName" : "literal_checker_326.cfm", - "function" : "", - "column" : 125, - "line" : 7, - "message" : "Literal 3 occurs several times in one or more files. Consider giving it a name and not hard coding values.", - "variable" : "3", - "expression" : "3" - } ] -}, { - "severity" : "WARNING", - "id" : "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN", - "message" : "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN", - "category" : "CFLINT", - "abbrev" : "GL", - "locations" : [ { - "file" : "src\\test\\resources\\com\\cflint\\tests\\LiteralChecker\\literal_checker_326.cfm", - "fileName" : "literal_checker_326.cfm", - "function" : "", - "column" : 130, - "line" : 7, - "message" : "Literal , occurs several times in one or more files. Consider giving it a name and not hard coding values.", - "variable" : ",", - "expression" : "','" - } ] +[ { + "severity" : "WARNING", + "id" : "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN", + "message" : "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN", + "category" : "CFLINT", + "abbrev" : "GL", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/LiteralChecker/literal_checker_326.cfm", + "fileName" : "literal_checker_326.cfm", + "function" : "", + "column" : 125, + "line" : 7, + "message" : "Literal 3 occurs several times in one or more files. Consider giving it a name and not hard coding values.", + "variable" : "3", + "expression" : "3" + } ] +}, { + "severity" : "WARNING", + "id" : "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN", + "message" : "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN", + "category" : "CFLINT", + "abbrev" : "GL", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/LiteralChecker/literal_checker_326.cfm", + "fileName" : "literal_checker_326.cfm", + "function" : "", + "column" : 130, + "line" : 7, + "message" : "Literal , occurs several times in one or more files. Consider giving it a name and not hard coding values.", + "variable" : ",", + "expression" : "','" + } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN", + "count" : 2 +}, { + "severity" : "WARNING", + "count" : 2 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/MissingSemiColon/missingSemis1.expected.txt b/src/test/resources/com/cflint/tests/MissingSemiColon/missingSemis1.expected.txt index 7fa556350..e6010ee2b 100644 --- a/src/test/resources/com/cflint/tests/MissingSemiColon/missingSemis1.expected.txt +++ b/src/test/resources/com/cflint/tests/MissingSemiColon/missingSemis1.expected.txt @@ -1,17 +1,27 @@ -[ { - "severity" : "ERROR", - "id" : "MISSING_SEMI", - "message" : "MISSING_SEMI", - "category" : "CFLINT", - "abbrev" : "MS", - "locations" : [ { - "file" : "src/test/resources/com/cflint/tests/MissingSemiColon/missingSemis1.cfc", - "fileName" : "missingSemis1.cfc", - "function" : "", - "column" : 0, - "line" : 4, - "message" : "End of statement(;) expected instead of name2", - "variable" : "name2", - "expression" : "" - } ] +[ { + "severity" : "ERROR", + "id" : "MISSING_SEMI", + "message" : "MISSING_SEMI", + "category" : "CFLINT", + "abbrev" : "MS", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/MissingSemiColon/missingSemis1.cfc", + "fileName" : "missingSemis1.cfc", + "function" : "", + "column" : 0, + "line" : 4, + "message" : "End of statement(;) expected instead of name2", + "variable" : "name2", + "expression" : "" + } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "MISSING_SEMI", + "count" : 1 +}, { + "severity" : "ERROR", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Naming/nameEndsInNumberScript.expected.txt b/src/test/resources/com/cflint/tests/Naming/nameEndsInNumberScript.expected.txt index 305c0fc74..bd537ab60 100644 --- a/src/test/resources/com/cflint/tests/Naming/nameEndsInNumberScript.expected.txt +++ b/src/test/resources/com/cflint/tests/Naming/nameEndsInNumberScript.expected.txt @@ -46,4 +46,14 @@ "variable" : "name1", "expression" : "" } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "VAR_INVALID_NAME", + "count" : 3 +}, { + "severity" : "INFO", + "count" : 3 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Naming/tempVar.expected.txt b/src/test/resources/com/cflint/tests/Naming/tempVar.expected.txt index 44f3eb850..7c60a4ffe 100644 --- a/src/test/resources/com/cflint/tests/Naming/tempVar.expected.txt +++ b/src/test/resources/com/cflint/tests/Naming/tempVar.expected.txt @@ -14,4 +14,14 @@ "variable" : "tempStruct", "expression" : "" } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "VAR_IS_TEMPORARY", + "count" : 1 +}, { + "severity" : "INFO", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/PackageCase/packagecase_nok.expected.txt b/src/test/resources/com/cflint/tests/PackageCase/packagecase_nok.expected.txt index 5f167d922..78cffb36e 100644 --- a/src/test/resources/com/cflint/tests/PackageCase/packagecase_nok.expected.txt +++ b/src/test/resources/com/cflint/tests/PackageCase/packagecase_nok.expected.txt @@ -1,17 +1,27 @@ -[ { - "severity" : "WARNING", - "id" : "PACKAGE_CASE_MISMATCH", - "message" : "PACKAGE_CASE_MISMATCH", - "category" : "CFLINT", - "abbrev" : "PC", - "locations" : [ { - "file" : "src/test/resources/com/cflint/tests/PackageCase/packagecase_nok.cfc", - "fileName" : "packagecase_nok.cfc", - "function" : "", - "column" : 1, - "line" : 2, - "message" : "The case of the package folder and the object declaration do not match for tests.PackageCase.packagecase_nok.", - "variable" : "tests.PackageCase.packagecase_nok", - "expression" : "new tests.packagecase.packagecase_nok()" - } ] +[ { + "severity" : "WARNING", + "id" : "PACKAGE_CASE_MISMATCH", + "message" : "PACKAGE_CASE_MISMATCH", + "category" : "CFLINT", + "abbrev" : "PC", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/PackageCase/packagecase_nok.cfc", + "fileName" : "packagecase_nok.cfc", + "function" : "", + "column" : 1, + "line" : 2, + "message" : "The case of the package folder and the object declaration do not match for tests.PackageCase.packagecase_nok.", + "variable" : "tests.PackageCase.packagecase_nok", + "expression" : "new tests.packagecase.packagecase_nok()" + } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "PACKAGE_CASE_MISMATCH", + "count" : 1 +}, { + "severity" : "WARNING", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/PackageCase/packagecase_nokC.expected.txt b/src/test/resources/com/cflint/tests/PackageCase/packagecase_nokC.expected.txt index 58274b531..475bd6d7e 100644 --- a/src/test/resources/com/cflint/tests/PackageCase/packagecase_nokC.expected.txt +++ b/src/test/resources/com/cflint/tests/PackageCase/packagecase_nokC.expected.txt @@ -1,17 +1,27 @@ -[ { - "severity" : "WARNING", - "id" : "PACKAGE_CASE_MISMATCH", - "message" : "PACKAGE_CASE_MISMATCH", - "category" : "CFLINT", - "abbrev" : "PC", - "locations" : [ { - "file" : "src/test/resources/com/cflint/tests/PackageCase/packagecase_nokC.cfc", - "fileName" : "packagecase_nokC.cfc", - "function" : "", - "column" : 1, - "line" : 1, - "message" : "The case of the package folder and the object declaration do not match for tests.PackageCase.packagecase_nokC.", - "variable" : "tests.PackageCase.packagecase_nokC", - "expression" : "/r/nnew tests.packagecase.packagecase_nokC();/r/n" - } ] +[ { + "severity" : "WARNING", + "id" : "PACKAGE_CASE_MISMATCH", + "message" : "PACKAGE_CASE_MISMATCH", + "category" : "CFLINT", + "abbrev" : "PC", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/PackageCase/packagecase_nokC.cfc", + "fileName" : "packagecase_nokC.cfc", + "function" : "", + "column" : 1, + "line" : 1, + "message" : "The case of the package folder and the object declaration do not match for tests.PackageCase.packagecase_nokC.", + "variable" : "tests.PackageCase.packagecase_nokC", + "expression" : "\r\nnew tests.packagecase.packagecase_nokC();\r\n" + } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "PACKAGE_CASE_MISMATCH", + "count" : 1 +}, { + "severity" : "WARNING", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/PackageCase/packagecase_nok_b.expected.txt b/src/test/resources/com/cflint/tests/PackageCase/packagecase_nok_b.expected.txt index ea6abfb7f..99fd3beb6 100644 --- a/src/test/resources/com/cflint/tests/PackageCase/packagecase_nok_b.expected.txt +++ b/src/test/resources/com/cflint/tests/PackageCase/packagecase_nok_b.expected.txt @@ -1,17 +1,27 @@ -[ { - "severity" : "WARNING", - "id" : "PACKAGE_CASE_MISMATCH", - "message" : "PACKAGE_CASE_MISMATCH", - "category" : "CFLINT", - "abbrev" : "PC", - "locations" : [ { - "file" : "src/test/resources/com/cflint/tests/PackageCase/packagecase_nok_b.cfc", - "fileName" : "packagecase_nok_b.cfc", - "function" : "", - "column" : 1, - "line" : 4, - "message" : "The case of the package folder and the object declaration do not match for tests.PackageCase.packagecase_nok_b.", - "variable" : "tests.PackageCase.packagecase_nok_b", - "expression" : "CreateObject('component', 'tests.packagecase.packagecase_nok_b')" - } ] +[ { + "severity" : "WARNING", + "id" : "PACKAGE_CASE_MISMATCH", + "message" : "PACKAGE_CASE_MISMATCH", + "category" : "CFLINT", + "abbrev" : "PC", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/PackageCase/packagecase_nok_b.cfc", + "fileName" : "packagecase_nok_b.cfc", + "function" : "", + "column" : 1, + "line" : 4, + "message" : "The case of the package folder and the object declaration do not match for tests.PackageCase.packagecase_nok_b.", + "variable" : "tests.PackageCase.packagecase_nok_b", + "expression" : "CreateObject('component', 'tests.packagecase.packagecase_nok_b')" + } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "PACKAGE_CASE_MISMATCH", + "count" : 1 +}, { + "severity" : "WARNING", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/PackageCase/packagecase_ok.expected.txt b/src/test/resources/com/cflint/tests/PackageCase/packagecase_ok.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/PackageCase/packagecase_ok.expected.txt +++ b/src/test/resources/com/cflint/tests/PackageCase/packagecase_ok.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Parsing/Underscore.expected.txt b/src/test/resources/com/cflint/tests/Parsing/Underscore.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Parsing/Underscore.expected.txt +++ b/src/test/resources/com/cflint/tests/Parsing/Underscore.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Parsing/parsing253.expected.txt b/src/test/resources/com/cflint/tests/Parsing/parsing253.expected.txt index 47b248d1e..e54b94e12 100644 --- a/src/test/resources/com/cflint/tests/Parsing/parsing253.expected.txt +++ b/src/test/resources/com/cflint/tests/Parsing/parsing253.expected.txt @@ -1,17 +1,27 @@ -[ { - "severity" : "ERROR", - "id" : "MISSING_VAR", - "message" : "MISSING_VAR", - "category" : "CFLINT", - "abbrev" : "MV", - "locations" : [ { - "file" : "src\\test\\resources\\com\\cflint\\tests\\Parsing\\parsing253.cfm", - "fileName" : "parsing253.cfm", - "function" : "foo", - "column" : 7, - "line" : 4, - "message" : "Variable removeTagList is not declared with a var statement.", - "variable" : "removeTagList", - "expression" : "removeTagList" - } ] +[ { + "severity" : "ERROR", + "id" : "MISSING_VAR", + "message" : "MISSING_VAR", + "category" : "CFLINT", + "abbrev" : "MV", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/Parsing/parsing253.cfm", + "fileName" : "parsing253.cfm", + "function" : "foo", + "column" : 7, + "line" : 4, + "message" : "Variable removeTagList is not declared with a var statement.", + "variable" : "removeTagList", + "expression" : "removeTagList" + } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "MISSING_VAR", + "count" : 1 +}, { + "severity" : "ERROR", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Query/cfquery_param.expected.txt b/src/test/resources/com/cflint/tests/Query/cfquery_param.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Query/cfquery_param.expected.txt +++ b/src/test/resources/com/cflint/tests/Query/cfquery_param.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Query/cfquery_param2.expected.txt b/src/test/resources/com/cflint/tests/Query/cfquery_param2.expected.txt index 8878e547a..cceaec958 100644 --- a/src/test/resources/com/cflint/tests/Query/cfquery_param2.expected.txt +++ b/src/test/resources/com/cflint/tests/Query/cfquery_param2.expected.txt @@ -1 +1,5 @@ -[ ] \ No newline at end of file +[ { + "totalfiles" : 0 +}, { + "totalsize" : 0 +} ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Query/cfquery_param3.expected.txt b/src/test/resources/com/cflint/tests/Query/cfquery_param3.expected.txt index 5830dfb41..6380cf46c 100644 --- a/src/test/resources/com/cflint/tests/Query/cfquery_param3.expected.txt +++ b/src/test/resources/com/cflint/tests/Query/cfquery_param3.expected.txt @@ -1,17 +1,27 @@ -[ { - "severity" : "WARNING", - "id" : "CFQUERYPARAM_REQ", - "message" : "CFQUERYPARAM_REQ", - "category" : "CFLINT", - "abbrev" : "CR", - "locations" : [ { - "file" : "src/test/resources/com/cflint/tests/Query/cfquery_param3.cfc", - "fileName" : "cfquery_param3.cfc", - "function" : "foo", - "column" : 0, - "line" : 4, - "message" : " should use for variable 'arguments.count'.", - "variable" : "arguments.count", - "expression" : "/r/n/t/t SELECT top #arguments.count#/r/n/t/t /tfooCol1, siteID, fooCol3/r/n/t/t FROM/r/n/t/t FooTable/r/n/t/t" - } ] +[ { + "severity" : "WARNING", + "id" : "CFQUERYPARAM_REQ", + "message" : "CFQUERYPARAM_REQ", + "category" : "CFLINT", + "abbrev" : "CR", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/Query/cfquery_param3.cfc", + "fileName" : "cfquery_param3.cfc", + "function" : "foo", + "column" : 0, + "line" : 4, + "message" : " should use for variable 'arguments.count'.", + "variable" : "arguments.count", + "expression" : "\r\n\t\t SELECT top #arguments.count#\r\n\t\t \tfooCol1, siteID, fooCol3\r\n\t\t FROM\r\n\t\t FooTable\r\n\t\t" + } ] +}, { + "totalfiles" : 0 +}, { + "totalsize" : 0 +}, { + "code" : "CFQUERYPARAM_REQ", + "count" : 1 +}, { + "severity" : "WARNING", + "count" : 1 } ] \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Query/cfquery_param_byline.expected.txt b/src/test/resources/com/cflint/tests/Query/cfquery_param_byline.expected.txt index 8af00f0f3..5f2b7b65d 100644 --- a/src/test/resources/com/cflint/tests/Query/cfquery_param_byline.expected.txt +++ b/src/test/resources/com/cflint/tests/Query/cfquery_param_byline.expected.txt @@ -1,17 +1,27 @@ -[ { - "severity" : "WARNING", - "id" : "CFQUERYPARAM_REQ", - "message" : "CFQUERYPARAM_REQ", - "category" : "CFLINT", - "abbrev" : "CR", - "locations" : [ { - "file" : "src\\test\\resources\\com\\cflint\\tests\\Query\\cfquery_param_byline.cfc", - "fileName" : "cfquery_param_byline.cfc", - "function" : "foo", - "column" : 0, - "line" : 13, - "message" : " should use for variable 'application.linkedServerName'.", - "variable" : "application.linkedServerName", - "expression" : "\r\n SELECT\r\n M.firstName\r\n