diff --git a/src/main/java/com/cflint/JSONOutput.java b/src/main/java/com/cflint/JSONOutput.java index d5f6bddea..bc56ece3d 100644 --- a/src/main/java/com/cflint/JSONOutput.java +++ b/src/main/java/com/cflint/JSONOutput.java @@ -26,77 +26,99 @@ public void setPrettyPrint(final boolean prettyPrint) { public void output(final BugList bugList, final Writer writer, CFLintStats stats) throws IOException { final BugCounts counts = stats.getCounts(); - // final StringBuilder sb = new StringBuilder(); final JsonFactory jsonF = new JsonFactory(); final JsonGenerator jg = jsonF.createGenerator(writer); + if (prettyPrint) { jg.useDefaultPrettyPrinter(); } - jg.writeStartArray(); - List keys = new ArrayList(bugList.getBugList().keySet()); - Collections.sort(keys); - for (final String key : keys) { - List currentList = bugList.getBugList().get(key); - final Iterator iterator = currentList.iterator(); - BugInfo bugInfo = iterator.hasNext() ? iterator.next() : null; - BugInfo prevbugInfo; - - while (bugInfo != null) { - final String severity = currentList.get(0).getSeverity(); - final String code = currentList.get(0).getMessageCode(); - - jg.writeStartObject(); - jg.writeStringField("severity", notNull(severity)); - jg.writeStringField("id", code); - jg.writeStringField("message", code); - jg.writeStringField("category", "CFLINT"); - jg.writeStringField("abbrev", abbrev(code)); - jg.writeFieldName("locations"); - jg.writeStartArray(); - do { + + // start global object + jg.writeStartObject(); + + // start issues array + jg.writeFieldName("issues"); + jg.writeStartArray(); + + List keys = new ArrayList(bugList.getBugList().keySet()); + Collections.sort(keys); + + for (final String key : keys) { + List currentList = bugList.getBugList().get(key); + final Iterator iterator = currentList.iterator(); + BugInfo bugInfo = iterator.hasNext() ? iterator.next() : null; + BugInfo prevbugInfo; + + while (bugInfo != null) { + final String severity = currentList.get(0).getSeverity(); + final String code = currentList.get(0).getMessageCode(); + jg.writeStartObject(); - jg.writeStringField("file", notNull(bugInfo.getFilename())); - jg.writeStringField("fileName", filename(bugInfo.getFilename())); - jg.writeStringField("function", filename(bugInfo.getFunction())); - jg.writeNumberField("column", bugInfo.getColumn()); - jg.writeNumberField("line", bugInfo.getLine()); - jg.writeStringField("message", notNull(bugInfo.getMessage())); - jg.writeStringField("variable", notNull(bugInfo.getVariable())); - jg.writeStringField("expression", notNull(bugInfo.getExpression())); + jg.writeStringField("severity", notNull(severity)); + jg.writeStringField("id", code); + jg.writeStringField("message", code); + jg.writeStringField("category", "CFLINT"); + jg.writeStringField("abbrev", abbrev(code)); + jg.writeFieldName("locations"); + jg.writeStartArray(); + do { + jg.writeStartObject(); + jg.writeStringField("file", notNull(bugInfo.getFilename())); + jg.writeStringField("fileName", filename(bugInfo.getFilename())); + jg.writeStringField("function", filename(bugInfo.getFunction())); + jg.writeNumberField("column", bugInfo.getColumn()); + jg.writeNumberField("line", bugInfo.getLine()); + jg.writeStringField("message", notNull(bugInfo.getMessage())); + jg.writeStringField("variable", notNull(bugInfo.getVariable())); + jg.writeStringField("expression", notNull(bugInfo.getExpression())); + jg.writeEndObject(); + prevbugInfo = bugInfo; + bugInfo = iterator.hasNext() ? iterator.next() : null; + } while (isGrouped(prevbugInfo, bugInfo)); + jg.writeEndArray(); jg.writeEndObject(); - prevbugInfo = bugInfo; - bugInfo = iterator.hasNext() ? iterator.next() : null; - } while (isGrouped(prevbugInfo, bugInfo)); - jg.writeEndArray(); - jg.writeEndObject(); + } } - } - jg.writeStartObject(); - jg.writeNumberField("totalfiles", stats.getFileCount()); - jg.writeEndObject(); + // end issues array + jg.writeEndArray(); - jg.writeStartObject(); - jg.writeFieldName("totalsize"); - jg.writeNumber(stats.getTotalSize()); - jg.writeEndObject(); - - for (final String code : counts.bugTypes()) { + // start summary object + jg.writeFieldName("summary"); jg.writeStartObject(); - jg.writeStringField("code", code); - jg.writeNumberField("count", counts.getCode(code)); + jg.writeNumberField("totalfiles", stats.getFileCount()); + jg.writeFieldName("totalsize"); + jg.writeNumber(stats.getTotalSize()); + // start countByCode array + jg.writeFieldName("countByCode"); + jg.writeStartArray(); + for (final String code : counts.bugTypes()) { + jg.writeStartObject(); + jg.writeStringField("code", code); + jg.writeNumberField("count", counts.getCode(code)); + jg.writeEndObject(); + } + // end countByCode array + jg.writeEndArray(); + // start countBySeverity array + jg.writeFieldName("countBySeverity"); + jg.writeStartArray(); + for (final String severity : BugCounts.levels) { + if (counts.getSeverity(severity) > 0) { + jg.writeStartObject(); + jg.writeStringField("severity", severity); + jg.writeNumberField("count", counts.getSeverity(severity)); + jg.writeEndObject(); + } + } + // end countBySeverity array + jg.writeEndArray(); + // end summary object jg.writeEndObject(); - } - for (final String severity : BugCounts.levels) { - if (counts.getSeverity(severity) > 0) { - jg.writeStartObject(); - jg.writeStringField("severity", severity); - jg.writeNumberField("count", counts.getSeverity(severity)); - jg.writeEndObject(); - } - } - jg.writeEndArray(); + // end global object + jg.writeEndObject(); + jg.close(); writer.close(); } diff --git a/src/test/java/com/cflint/TestJSONOutput.java b/src/test/java/com/cflint/TestJSONOutput.java index 380d2808e..9f2388b0e 100644 --- a/src/test/java/com/cflint/TestJSONOutput.java +++ b/src/test/java/com/cflint/TestJSONOutput.java @@ -30,8 +30,8 @@ public void testOutput() throws IOException { bugList.add(bugInfo); CFLintStats stats = new CFLintStats(123456L,1,new BigInteger("545454")); outputer.output(bugList, writer, stats); - String expectedText = "[{\"severity\":\"\",\"id\":\"PARSE_ERROR\",\"message\":\"PARSE_ERROR\",\"category\":\"CFLINT\",\"abbrev\":\"PE\",\"locations\":[{\"file\":\"c:\\\\temp\\\\test.cfc\",\"fileName\":\"test.cfc\",\"function\":\"testf\",\"column\":1,\"line\":1,\"message\":\"\",\"variable\":\"\",\"expression\":\"\"}]},{\"totalfiles\":1},{\"totalsize\":545454}]"; -// assertEquals(JSONValue.parse(expectedText),JSONValue.parse(writer.toString())); + String expectedText = "{\"issues\":[{\"severity\":\"\",\"id\":\"PARSE_ERROR\",\"message\":\"PARSE_ERROR\",\"category\":\"CFLINT\",\"abbrev\":\"PE\",\"locations\":[{\"file\":\"c:\\\\temp\\\\test.cfc\",\"fileName\":\"test.cfc\",\"function\":\"testf\",\"column\":1,\"line\":1,\"message\":\"\",\"variable\":\"\",\"expression\":\"\"}]}],\"summary\":{\"totalfiles\":1,\"totalsize\":545454,\"countByCode\":[],\"countBySeverity\":[]}}"; + assertEquals(expectedText,writer.toString()); } @@ -43,7 +43,8 @@ public void testStats() throws IOException { counts.add("PARSE_ERROR", null); CFLintStats stats = new CFLintStats(123456L,1,new BigInteger("545454"),counts); outputer.output(bugList, writer, stats); - String expectedText = "[{\"severity\":\"\",\"id\":\"PARSE_ERROR\",\"message\":\"PARSE_ERROR\",\"category\":\"CFLINT\",\"abbrev\":\"PE\",\"locations\":[{\"file\":\"c:\\\\temp\\\\test.cfc\",\"fileName\":\"test.cfc\",\"function\":\"testf\",\"column\":1,\"line\":1,\"message\":\"\",\"variable\":\"\",\"expression\":\"\"}]},{\"totalfiles\":1},{\"totalsize\":545454},{\"code\":\"PARSE_ERROR\",\"count\":1}]"; + String expectedText = "{\"issues\":[{\"severity\":\"\",\"id\":\"PARSE_ERROR\",\"message\":\"PARSE_ERROR\",\"category\":\"CFLINT\",\"abbrev\":\"PE\",\"locations\":[{\"file\":\"c:\\\\temp\\\\test.cfc\",\"fileName\":\"test.cfc\",\"function\":\"testf\",\"column\":1,\"line\":1,\"message\":\"\",\"variable\":\"\",\"expression\":\"\"}]}],\"summary\":{\"totalfiles\":1,\"totalsize\":545454,\"countByCode\":[{\"code\":\"PARSE_ERROR\",\"count\":1}],\"countBySeverity\":[]}}"; + assertEquals(expectedText,writer.toString()); } @@ -55,7 +56,8 @@ public void testStatsWithSeverity() throws IOException { counts.add("PARSE_ERROR", "ERROR"); CFLintStats stats = new CFLintStats(123456L,1,new BigInteger("545454"),counts); outputer.output(bugList, writer, stats); - String expectedText = "[{\"severity\":\"ERROR\",\"id\":\"PARSE_ERROR\",\"message\":\"PARSE_ERROR\",\"category\":\"CFLINT\",\"abbrev\":\"PE\",\"locations\":[{\"file\":\"c:\\\\temp\\\\test.cfc\",\"fileName\":\"test.cfc\",\"function\":\"testf\",\"column\":1,\"line\":1,\"message\":\"\",\"variable\":\"\",\"expression\":\"\"}]},{\"totalfiles\":1},{\"totalsize\":545454},{\"code\":\"PARSE_ERROR\",\"count\":1},{\"severity\":\"ERROR\",\"count\":1}]"; + String expectedText = "{\"issues\":[{\"severity\":\"ERROR\",\"id\":\"PARSE_ERROR\",\"message\":\"PARSE_ERROR\",\"category\":\"CFLINT\",\"abbrev\":\"PE\",\"locations\":[{\"file\":\"c:\\\\temp\\\\test.cfc\",\"fileName\":\"test.cfc\",\"function\":\"testf\",\"column\":1,\"line\":1,\"message\":\"\",\"variable\":\"\",\"expression\":\"\"}]}],\"summary\":{\"totalfiles\":1,\"totalsize\":545454,\"countByCode\":[{\"code\":\"PARSE_ERROR\",\"count\":1}],\"countBySeverity\":[{\"severity\":\"ERROR\",\"count\":1}]}}"; + assertEquals(expectedText,writer.toString()); } diff --git a/src/test/resources/com/cflint/integration/output.expected.json b/src/test/resources/com/cflint/integration/output.expected.json index af3726989..454e614b5 100644 --- a/src/test/resources/com/cflint/integration/output.expected.json +++ b/src/test/resources/com/cflint/integration/output.expected.json @@ -1,78 +1,78 @@ -[ { - "severity" : "INFO", - "id" : "COMPONENT_INVALID_NAME", - "message" : "COMPONENT_INVALID_NAME", - "category" : "CFLINT", - "abbrev" : "CI", - "locations" : [ { - "file" : "C:\\Users\\Ryan\\git\\CFLint\\src\\test\\resources\\com\\cflint\\integration\\inherit\\test.cfc", - "fileName" : "test.cfc", - "function" : "", - "column" : 0, - "line" : 1, - "message" : "Component name test is not a valid name. Please use CamelCase and start with a capital letter.", - "variable" : "", - "expression" : "component {\n public string function getStringFromStruct(interestingVar) {\n return interestingVar;\n\n }\n}" - } ] -}, { - "severity" : "INFO", - "id" : "FUNCTION_HINT_MISSING", - "message" : "FUNCTION_HINT_MISSING", - "category" : "CFLINT", - "abbrev" : "FH", - "locations" : [ { - "file" : "C:\\Users\\Ryan\\git\\CFLint\\src\\test\\resources\\com\\cflint\\integration\\inherit\\test.cfc", - "fileName" : "test.cfc", - "function" : "getStringFromStruct", - "column" : 16, - "line" : 2, - "message" : "Function getStringFromStruct is missing a hint.", - "variable" : "getStringFromStruct", - "expression" : "public string function getStringFromStruct(interestingVar) {\n return interestingVar;\n\n }" - } ] -}, { - "severity" : "INFO", - "id" : "FUNCTION_HINT_MISSING", - "message" : "FUNCTION_HINT_MISSING", - "category" : "CFLINT", - "abbrev" : "FH", - "locations" : [ { - "file" : "C:\\Users\\Ryan\\git\\CFLint\\src\\test\\resources\\com\\cflint\\integration\\standalone\\test.cfc", - "fileName" : "test.cfc", - "function" : "getStringFromStruct", - "column" : 16, - "line" : 2, - "message" : "Function getStringFromStruct is missing a hint.", - "variable" : "getStringFromStruct", - "expression" : "public string function getStringFromStruct(interestingVar) {\n return interestingVar;\n\n }" - } ] -}, { - "severity" : "INFO", - "id" : "FUNCTION_HINT_MISSING", - "message" : "FUNCTION_HINT_MISSING", - "category" : "CFLINT", - "abbrev" : "FH", - "locations" : [ { - "file" : "C:\\Users\\Ryan\\git\\CFLint\\src\\test\\resources\\com\\cflint\\integration\\test.cfc", - "fileName" : "test.cfc", - "function" : "getStringFromStruct", - "column" : 16, - "line" : 2, - "message" : "Function getStringFromStruct is missing a hint.", - "variable" : "getStringFromStruct", - "expression" : "public string function getStringFromStruct(interestingVar) {\n return interestingVar;\n\n }" - } ] -}, { - "totalfiles" : 3 -}, { - "totalsize" : 18 -}, { - "code" : "FUNCTION_HINT_MISSING", - "count" : 3 -}, { - "code" : "COMPONENT_INVALID_NAME", - "count" : 1 -}, { - "severity" : "INFO", - "count" : 4 -} ] \ No newline at end of file +{ + "issues" : [ { + "severity" : "INFO", + "id" : "COMPONENT_INVALID_NAME", + "message" : "COMPONENT_INVALID_NAME", + "category" : "CFLINT", + "abbrev" : "CI", + "locations" : [ { + "fileName" : "test.cfc", + "function" : "", + "column" : 0, + "line" : 1, + "message" : "Component name test is not a valid name. Please use CamelCase and start with a capital letter.", + "variable" : "", + "expression" : "component {/n public string function getStringFromStruct(interestingVar) {/n return interestingVar;/n/n }/n}" + } ] + }, { + "severity" : "INFO", + "id" : "FUNCTION_HINT_MISSING", + "message" : "FUNCTION_HINT_MISSING", + "category" : "CFLINT", + "abbrev" : "FH", + "locations" : [ { + "fileName" : "test.cfc", + "function" : "getStringFromStruct", + "column" : 16, + "line" : 2, + "message" : "Function getStringFromStruct is missing a hint.", + "variable" : "getStringFromStruct", + "expression" : "public string function getStringFromStruct(interestingVar) {/n return interestingVar;/n/n }" + } ] + }, { + "severity" : "INFO", + "id" : "FUNCTION_HINT_MISSING", + "message" : "FUNCTION_HINT_MISSING", + "category" : "CFLINT", + "abbrev" : "FH", + "locations" : [ { + "fileName" : "test.cfc", + "function" : "getStringFromStruct", + "column" : 16, + "line" : 2, + "message" : "Function getStringFromStruct is missing a hint.", + "variable" : "getStringFromStruct", + "expression" : "public string function getStringFromStruct(interestingVar) {/n return interestingVar;/n/n }" + } ] + }, { + "severity" : "INFO", + "id" : "FUNCTION_HINT_MISSING", + "message" : "FUNCTION_HINT_MISSING", + "category" : "CFLINT", + "abbrev" : "FH", + "locations" : [ { + "fileName" : "test.cfc", + "function" : "getStringFromStruct", + "column" : 16, + "line" : 2, + "message" : "Function getStringFromStruct is missing a hint.", + "variable" : "getStringFromStruct", + "expression" : "public string function getStringFromStruct(interestingVar) {/n return interestingVar;/n/n }" + } ] + } ], + "summary" : { + "totalfiles" : 3, + "totalsize" : 18, + "countByCode" : [ { + "code" : "FUNCTION_HINT_MISSING", + "count" : 3 + }, { + "code" : "COMPONENT_INVALID_NAME", + "count" : 1 + } ], + "countBySeverity" : [ { + "severity" : "INFO", + "count" : 4 + } ] + } +} \ No newline at end of file diff --git a/src/test/resources/com/cflint/integration/output.rulegroup.expected.json b/src/test/resources/com/cflint/integration/output.rulegroup.expected.json index a416e3150..22486119e 100644 --- a/src/test/resources/com/cflint/integration/output.rulegroup.expected.json +++ b/src/test/resources/com/cflint/integration/output.rulegroup.expected.json @@ -1,27 +1,30 @@ -[ { - "severity" : "INFO", - "id" : "COMPONENT_INVALID_NAME", - "message" : "COMPONENT_INVALID_NAME", - "category" : "CFLINT", - "abbrev" : "CI", - "locations" : [ { - "file" : "C:\\Users\\Ryan\\git\\CFLint\\src\\test\\resources\\com\\cflint\\integration\\inherit\\test.cfc", - "fileName" : "test.cfc", - "function" : "", - "column" : 0, - "line" : 1, - "message" : "Component name test is not a valid name. Please use CamelCase and start with a capital letter.", - "variable" : "", - "expression" : "component {\n public string function getStringFromStruct(interestingVar) {\n return interestingVar;\n\n }\n}" - } ] -}, { - "totalfiles" : 3 -}, { - "totalsize" : 18 -}, { - "code" : "COMPONENT_INVALID_NAME", - "count" : 1 -}, { - "severity" : "INFO", - "count" : 1 -} ] \ No newline at end of file +{ + "issues" : [ { + "severity" : "INFO", + "id" : "COMPONENT_INVALID_NAME", + "message" : "COMPONENT_INVALID_NAME", + "category" : "CFLINT", + "abbrev" : "CI", + "locations" : [ { + "fileName" : "test.cfc", + "function" : "", + "column" : 0, + "line" : 1, + "message" : "Component name test is not a valid name. Please use CamelCase and start with a capital letter.", + "variable" : "", + "expression" : "component {/n public string function getStringFromStruct(interestingVar) {/n return interestingVar;/n/n }/n}" + } ] + } ], + "summary" : { + "totalfiles" : 3, + "totalsize" : 18, + "countByCode" : [ { + "code" : "COMPONENT_INVALID_NAME", + "count" : 1 + } ], + "countBySeverity" : [ { + "severity" : "INFO", + "count" : 1 + } ] + } +} \ No newline at end of file diff --git a/src/test/resources/com/cflint/integration/output_194.expected.json b/src/test/resources/com/cflint/integration/output_194.expected.json index a416e3150..22486119e 100644 --- a/src/test/resources/com/cflint/integration/output_194.expected.json +++ b/src/test/resources/com/cflint/integration/output_194.expected.json @@ -1,27 +1,30 @@ -[ { - "severity" : "INFO", - "id" : "COMPONENT_INVALID_NAME", - "message" : "COMPONENT_INVALID_NAME", - "category" : "CFLINT", - "abbrev" : "CI", - "locations" : [ { - "file" : "C:\\Users\\Ryan\\git\\CFLint\\src\\test\\resources\\com\\cflint\\integration\\inherit\\test.cfc", - "fileName" : "test.cfc", - "function" : "", - "column" : 0, - "line" : 1, - "message" : "Component name test is not a valid name. Please use CamelCase and start with a capital letter.", - "variable" : "", - "expression" : "component {\n public string function getStringFromStruct(interestingVar) {\n return interestingVar;\n\n }\n}" - } ] -}, { - "totalfiles" : 3 -}, { - "totalsize" : 18 -}, { - "code" : "COMPONENT_INVALID_NAME", - "count" : 1 -}, { - "severity" : "INFO", - "count" : 1 -} ] \ No newline at end of file +{ + "issues" : [ { + "severity" : "INFO", + "id" : "COMPONENT_INVALID_NAME", + "message" : "COMPONENT_INVALID_NAME", + "category" : "CFLINT", + "abbrev" : "CI", + "locations" : [ { + "fileName" : "test.cfc", + "function" : "", + "column" : 0, + "line" : 1, + "message" : "Component name test is not a valid name. Please use CamelCase and start with a capital letter.", + "variable" : "", + "expression" : "component {/n public string function getStringFromStruct(interestingVar) {/n return interestingVar;/n/n }/n}" + } ] + } ], + "summary" : { + "totalfiles" : 3, + "totalsize" : 18, + "countByCode" : [ { + "code" : "COMPONENT_INVALID_NAME", + "count" : 1 + } ], + "countBySeverity" : [ { + "severity" : "INFO", + "count" : 1 + } ] + } +} \ No newline at end of file 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 cceaec958..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/ArgVarConflict/mixedScopeExample.expected.txt +++ b/src/test/resources/com/cflint/tests/ArgVarConflict/mixedScopeExample.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 6d7c29fee..98cb876bb 100644 --- a/src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate1.expected.txt +++ b/src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate1.expected.txt @@ -1,27 +1,31 @@ -[ { - "severity" : "WARNING", - "id" : "AVOID_USING_ISDATE", - "message" : "AVOID_USING_ISDATE", - "category" : "CFLINT", - "abbrev" : "AU", - "locations" : [ { - "file" : "src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate1.cfm", - "fileName" : "isDate1.cfm", - "function" : "foo", - "column" : 17, - "line" : 3, - "message" : "Avoid using the isDate built-in function. It is too permissive. Using isValid() instead.", - "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 +{ + "issues" : [ { + "severity" : "WARNING", + "id" : "AVOID_USING_ISDATE", + "message" : "AVOID_USING_ISDATE", + "category" : "CFLINT", + "abbrev" : "AU", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate1.cfm", + "fileName" : "isDate1.cfm", + "function" : "foo", + "column" : 17, + "line" : 3, + "message" : "Avoid using the isDate built-in function. It is too permissive. Using isValid() instead.", + "variable" : "", + "expression" : "isDate(1.5)" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "AVOID_USING_ISDATE", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 d675fc494..eca7d51bd 100644 --- a/src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate2.expected.txt +++ b/src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate2.expected.txt @@ -1,27 +1,31 @@ -[ { - "severity" : "WARNING", - "id" : "AVOID_USING_ISDATE", - "message" : "AVOID_USING_ISDATE", - "category" : "CFLINT", - "abbrev" : "AU", - "locations" : [ { - "file" : "src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate2.cfm", - "fileName" : "isDate2.cfm", - "function" : "foo", - "column" : 19, - "line" : 3, - "message" : "Avoid using the isDate built-in function. It is too permissive. Using isValid() instead.", - "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 +{ + "issues" : [ { + "severity" : "WARNING", + "id" : "AVOID_USING_ISDATE", + "message" : "AVOID_USING_ISDATE", + "category" : "CFLINT", + "abbrev" : "AU", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/BuiltInFunctionChecker/isDate2.cfm", + "fileName" : "isDate2.cfm", + "function" : "foo", + "column" : 19, + "line" : 3, + "message" : "Avoid using the isDate built-in function. It is too permissive. Using isValid() instead.", + "variable" : "", + "expression" : "isDate(1.5)" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "AVOID_USING_ISDATE", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 f4e8fc238..c09b394f1 100644 --- a/src/test/resources/com/cflint/tests/CFIncludeChecker/cfinclude1.expected.txt +++ b/src/test/resources/com/cflint/tests/CFIncludeChecker/cfinclude1.expected.txt @@ -1,27 +1,31 @@ -[ { - "severity" : "WARNING", - "id" : "AVOID_USING_CFINCLUDE_TAG", - "message" : "AVOID_USING_CFINCLUDE_TAG", - "category" : "CFLINT", - "abbrev" : "AU", - "locations" : [ { - "file" : "src/test/resources/com/cflint/tests/CFIncludeChecker/cfinclude1.cfc", - "fileName" : "cfinclude1.cfc", - "function" : "", - "column" : 3, - "line" : 3, - "message" : "Avoid using tags. Use components instead.", - "variable" : "cfinclude", - "expression" : "" - } ] -}, { - "totalfiles" : 0 -}, { - "totalsize" : 0 -}, { - "code" : "AVOID_USING_CFINCLUDE_TAG", - "count" : 1 -}, { - "severity" : "WARNING", - "count" : 1 -} ] \ No newline at end of file +{ + "issues" : [ { + "severity" : "WARNING", + "id" : "AVOID_USING_CFINCLUDE_TAG", + "message" : "AVOID_USING_CFINCLUDE_TAG", + "category" : "CFLINT", + "abbrev" : "AU", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/CFIncludeChecker/cfinclude1.cfc", + "fileName" : "cfinclude1.cfc", + "function" : "", + "column" : 3, + "line" : 3, + "message" : "Avoid using tags. Use components instead.", + "variable" : "cfinclude", + "expression" : "" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "AVOID_USING_CFINCLUDE_TAG", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 94f451d63..d239769d7 100644 --- a/src/test/resources/com/cflint/tests/CFIncludeChecker/lonelyCfinclude.expected.txt +++ b/src/test/resources/com/cflint/tests/CFIncludeChecker/lonelyCfinclude.expected.txt @@ -1,27 +1,31 @@ -[ { - "severity" : "WARNING", - "id" : "AVOID_USING_CFINCLUDE_TAG", - "message" : "AVOID_USING_CFINCLUDE_TAG", - "category" : "CFLINT", - "abbrev" : "AU", - "locations" : [ { - "file" : "src/test/resources/com/cflint/tests/CFIncludeChecker/lonelyCfinclude.cfc", - "fileName" : "lonelyCfinclude.cfc", - "function" : "", - "column" : 3, - "line" : 3, - "message" : "Avoid using tags. Use components instead.", - "variable" : "cfinclude", - "expression" : "" - } ] -}, { - "totalfiles" : 0 -}, { - "totalsize" : 0 -}, { - "code" : "AVOID_USING_CFINCLUDE_TAG", - "count" : 1 -}, { - "severity" : "WARNING", - "count" : 1 -} ] \ No newline at end of file +{ + "issues" : [ { + "severity" : "WARNING", + "id" : "AVOID_USING_CFINCLUDE_TAG", + "message" : "AVOID_USING_CFINCLUDE_TAG", + "category" : "CFLINT", + "abbrev" : "AU", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/CFIncludeChecker/lonelyCfinclude.cfc", + "fileName" : "lonelyCfinclude.cfc", + "function" : "", + "column" : 3, + "line" : 3, + "message" : "Avoid using tags. Use components instead.", + "variable" : "cfinclude", + "expression" : "" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "AVOID_USING_CFINCLUDE_TAG", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 f90608631..111beb731 100644 --- a/src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare1.expected.txt +++ b/src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare1.expected.txt @@ -1,43 +1,47 @@ -[ { - "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 +{ + "issues" : [ { + "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" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "COMPARE_INSTEAD_OF_ASSIGN", + "count" : 2 + } ], + "countBySeverity" : [ { + "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 cceaec958..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare2.expected.txt +++ b/src/test/resources/com/cflint/tests/CompareInsteadOfAssign/Compare2.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 cceaec958..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/Complexity/ifelse.expected.txt +++ b/src/test/resources/com/cflint/tests/Complexity/ifelse.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 6daef50cf..b518fd7dd 100644 --- a/src/test/resources/com/cflint/tests/Complexity/ifelseComplex.expected.txt +++ b/src/test/resources/com/cflint/tests/Complexity/ifelseComplex.expected.txt @@ -1,27 +1,31 @@ -[ { - "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 +{ + "issues" : [ { + "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 }" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "FUNCTION_TOO_COMPLEX", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 f08af2c70..83ea7a2df 100644 --- a/src/test/resources/com/cflint/tests/ComponentNameChecker/foo.expected.txt +++ b/src/test/resources/com/cflint/tests/ComponentNameChecker/foo.expected.txt @@ -1,27 +1,31 @@ -[ { - "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 foo is not a valid name. Please use CamelCase and start with a capital letter.", - "variable" : "", - "expression" : "component {\n}" - } ] -}, { - "totalfiles" : 0 -}, { - "totalsize" : 0 -}, { - "code" : "COMPONENT_INVALID_NAME", - "count" : 1 -}, { - "severity" : "INFO", - "count" : 1 -} ] \ No newline at end of file +{ + "issues" : [ { + "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 foo is not a valid name. Please use CamelCase and start with a capital letter.", + "variable" : "", + "expression" : "component {\n}" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "COMPONENT_INVALID_NAME", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 c507ec536..6f97c5f36 100644 --- a/src/test/resources/com/cflint/tests/ComponentNameChecker/foofoo.expected.txt +++ b/src/test/resources/com/cflint/tests/ComponentNameChecker/foofoo.expected.txt @@ -1,27 +1,31 @@ -[ { - "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}" - } ] -}, { - "totalfiles" : 0 -}, { - "totalsize" : 0 -}, { - "code" : "COMPONENT_INVALID_NAME", - "count" : 1 -}, { - "severity" : "INFO", - "count" : 1 -} ] \ No newline at end of file +{ + "issues" : [ { + "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}" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "COMPONENT_INVALID_NAME", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 650c51d44..c40f77638 100644 --- a/src/test/resources/com/cflint/tests/EmptyFile/foo.expected.txt +++ b/src/test/resources/com/cflint/tests/EmptyFile/foo.expected.txt @@ -1,27 +1,31 @@ -[ { - "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 +{ + "issues" : [ { + "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" : "" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "AVOID_EMPTY_FILES", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 b873b2fb6..45b84b1a3 100644 --- a/src/test/resources/com/cflint/tests/EmptyFile/fooWS.expected.txt +++ b/src/test/resources/com/cflint/tests/EmptyFile/fooWS.expected.txt @@ -1,27 +1,31 @@ -[ { - "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 +{ + "issues" : [ { + "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" : "" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "AVOID_EMPTY_FILES", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 cceaec958..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/ExcludesAll/someErrors.expected.txt +++ b/src/test/resources/com/cflint/tests/ExcludesAll/someErrors.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 938f86ea0..df77b038e 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,27 +1,31 @@ -[ { - "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 +{ + "issues" : [ { + "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 }" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "FUNCTION_TYPE_ANY", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 cceaec958..e190a2757 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,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 cceaec958..e190a2757 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,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 cceaec958..e190a2757 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,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 ec930640f..d255987ab 100644 --- a/src/test/resources/com/cflint/tests/Hints/hints1.expected.txt +++ b/src/test/resources/com/cflint/tests/Hints/hints1.expected.txt @@ -1,27 +1,31 @@ -[ { - "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 +{ + "issues" : [ { + "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}" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "COMPONENT_HINT_MISSING", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 cceaec958..e190a2757 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,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 cceaec958..e190a2757 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,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 53a9c427d..8de8c9c42 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,49 +1,53 @@ -[ { - "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 +{ + "issues" : [ { + "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 }" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "COMPONENT_HINT_MISSING", + "count" : 1 + }, { + "code" : "FUNCTION_HINT_MISSING", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 cceaec958..e190a2757 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,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 cceaec958..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny1.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny1.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 0a2a9ca11..ba6f17355 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny2.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny2.expected.txt @@ -1,27 +1,31 @@ -[ { - "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 +{ + "issues" : [ { + "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" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "MISSING_VAR", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 cceaec958..e190a2757 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,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 cceaec958..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny4.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny4.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 cceaec958..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny5.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLAny5.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 2a3a26ab5..6618e9003 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLComponent.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLComponent.expected.txt @@ -1,27 +1,31 @@ -[ { - "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 +{ + "issues" : [ { + "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" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "MISSING_VAR", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 cceaec958..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLComponent2.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLComponent2.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 cceaec958..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLFunction.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreCFMLFunction.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 cceaec958..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreLine1.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreLine1.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 cceaec958..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreLineMessage1.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreLineMessage1.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 0301a9287..bc1eeb6e6 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreLineMessageUnmatched.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreLineMessageUnmatched.expected.txt @@ -1,27 +1,31 @@ -[ { - "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 +{ + "issues" : [ { + "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" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "MISSING_VAR", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 c844511ae..06adcc078 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLine.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLine.expected.txt @@ -1,27 +1,31 @@ -[ { - "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 +{ + "issues" : [ { + "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" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "MISSING_VAR", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 cceaec958..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLine2.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLine2.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 10059053d..d2ede0ed7 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLineComponent.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLineComponent.expected.txt @@ -1,27 +1,31 @@ -[ { - "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 +{ + "issues" : [ { + "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" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "MISSING_VAR", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 cceaec958..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLineComponent2.expected.txt +++ b/src/test/resources/com/cflint/tests/Ignores/ignoreMultiLineComponent2.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Includes/Header.expected.txt b/src/test/resources/com/cflint/tests/Includes/Header.expected.txt index 65915fa18..f7a06399f 100644 --- a/src/test/resources/com/cflint/tests/Includes/Header.expected.txt +++ b/src/test/resources/com/cflint/tests/Includes/Header.expected.txt @@ -1,59 +1,63 @@ -[ { - "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\\Includes\\Header.cfm", - "fileName" : "Header.cfm", - "function" : "", - "column" : 71, - "line" : 2, - "message" : "Literal companyName occurs several times in one or more files. Consider giving it a name and not hard coding values.", - "variable" : "companyName", - "expression" : "'companyName'" - } ] -}, { - "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\\Includes\\Header.cfm", - "fileName" : "Header.cfm", - "function" : "", - "column" : 33, - "line" : 3, - "message" : "Literal companyName occurs several times in one or more files. Consider giving it a name and not hard coding values.", - "variable" : "companyName", - "expression" : "'companyName'" - } ] -}, { - "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\\Includes\\Header.cfm", - "fileName" : "Header.cfm", - "function" : "", - "column" : 71, - "line" : 3, - "message" : "Literal companyName occurs several times in one or more files. Consider giving it a name and not hard coding values.", - "variable" : "companyName", - "expression" : "'companyName'" - } ] -}, { - "totalfiles" : 0 -}, { - "totalsize" : 0 -}, { - "code" : "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN", - "count" : 3 -}, { - "severity" : "WARNING", - "count" : 3 -} ] \ No newline at end of file +{ + "issues" : [ { + "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/Includes/Header.cfm", + "fileName" : "Header.cfm", + "function" : "", + "column" : 71, + "line" : 2, + "message" : "Literal companyName occurs several times in one or more files. Consider giving it a name and not hard coding values.", + "variable" : "companyName", + "expression" : "'companyName'" + } ] + }, { + "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/Includes/Header.cfm", + "fileName" : "Header.cfm", + "function" : "", + "column" : 33, + "line" : 3, + "message" : "Literal companyName occurs several times in one or more files. Consider giving it a name and not hard coding values.", + "variable" : "companyName", + "expression" : "'companyName'" + } ] + }, { + "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/Includes/Header.cfm", + "fileName" : "Header.cfm", + "function" : "", + "column" : 71, + "line" : 3, + "message" : "Literal companyName occurs several times in one or more files. Consider giving it a name and not hard coding values.", + "variable" : "companyName", + "expression" : "'companyName'" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN", + "count" : 3 + } ], + "countBySeverity" : [ { + "severity" : "WARNING", + "count" : 3 + } ] + } +} \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Includes/Template.expected.txt b/src/test/resources/com/cflint/tests/Includes/Template.expected.txt index 210f09b32..3fbe7e889 100644 --- a/src/test/resources/com/cflint/tests/Includes/Template.expected.txt +++ b/src/test/resources/com/cflint/tests/Includes/Template.expected.txt @@ -1,27 +1,31 @@ -[ { - "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/Includes/Template.cfm", - "fileName" : "Template.cfm", - "function" : "", - "column" : 33, - "line" : 2, - "message" : "Literal companyName occurs several times in one or more files. Consider giving it a name and not hard coding values.", - "variable" : "companyName", - "expression" : "'companyName'" - } ] -}, { - "totalfiles" : 0 -}, { - "totalsize" : 0 -}, { - "code" : "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN", - "count" : 1 -}, { - "severity" : "WARNING", - "count" : 1 -} ] \ No newline at end of file +{ + "issues" : [ { + "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/Includes/Template.cfm", + "fileName" : "Template.cfm", + "function" : "", + "column" : 33, + "line" : 2, + "message" : "Literal companyName occurs several times in one or more files. Consider giving it a name and not hard coding values.", + "variable" : "companyName", + "expression" : "'companyName'" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN", + "count" : 1 + } ], + "countBySeverity" : [ { + "severity" : "WARNING", + "count" : 1 + } ] + } +} \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/LiteralChecker/literal_arraysort.expected.txt b/src/test/resources/com/cflint/tests/LiteralChecker/literal_arraysort.expected.txt index ff34de20d..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/LiteralChecker/literal_arraysort.expected.txt +++ b/src/test/resources/com/cflint/tests/LiteralChecker/literal_arraysort.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 46f86e4bc..32fae4015 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,27 +1,31 @@ -[ { - "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" - } ] -}, { - "totalfiles" : 0 -}, { - "totalsize" : 0 -}, { - "code" : "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN", - "count" : 1 -}, { - "severity" : "WARNING", - "count" : 1 -} ] \ No newline at end of file +{ + "issues" : [ { + "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" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN", + "count" : 1 + } ], + "countBySeverity" : [ { + "severity" : "WARNING", + "count" : 1 + } ] + } +} \ 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 e6010ee2b..e9a00a96c 100644 --- a/src/test/resources/com/cflint/tests/MissingSemiColon/missingSemis1.expected.txt +++ b/src/test/resources/com/cflint/tests/MissingSemiColon/missingSemis1.expected.txt @@ -1,27 +1,31 @@ -[ { - "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 +{ + "issues" : [ { + "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" : "" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "MISSING_SEMI", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 bd537ab60..01f3f57c4 100644 --- a/src/test/resources/com/cflint/tests/Naming/nameEndsInNumberScript.expected.txt +++ b/src/test/resources/com/cflint/tests/Naming/nameEndsInNumberScript.expected.txt @@ -1,59 +1,63 @@ -[ { - "severity" : "INFO", - "id" : "VAR_INVALID_NAME", - "message" : "VAR_INVALID_NAME", - "category" : "CFLINT", - "abbrev" : "VI", - "locations" : [ { - "file" : "src/test/resources/com/cflint/tests/Naming/nameEndsInNumberScript.cfc", - "fileName" : "nameEndsInNumberScript.cfc", - "function" : "test", - "column" : 0, - "line" : 3, - "message" : "Variable name_1 is not a valid name. Please use CamelCase or underscores.", - "variable" : "name_1", - "expression" : "" - } ] -}, { - "severity" : "INFO", - "id" : "VAR_INVALID_NAME", - "message" : "VAR_INVALID_NAME", - "category" : "CFLINT", - "abbrev" : "VI", - "locations" : [ { - "file" : "src/test/resources/com/cflint/tests/Naming/nameEndsInNumberScript.cfc", - "fileName" : "nameEndsInNumberScript.cfc", - "function" : "test", - "column" : 0, - "line" : 4, - "message" : "Variable name2 is not a valid name. Please use CamelCase or underscores.", - "variable" : "name2", - "expression" : "" - } ] -}, { - "severity" : "INFO", - "id" : "VAR_INVALID_NAME", - "message" : "VAR_INVALID_NAME", - "category" : "CFLINT", - "abbrev" : "VI", - "locations" : [ { - "file" : "src/test/resources/com/cflint/tests/Naming/nameEndsInNumberScript.cfc", - "fileName" : "nameEndsInNumberScript.cfc", - "function" : "test", - "column" : 0, - "line" : 5, - "message" : "Variable name1 is not a valid name. Please use CamelCase or underscores.", - "variable" : "name1", - "expression" : "" - } ] -}, { - "totalfiles" : 0 -}, { - "totalsize" : 0 -}, { - "code" : "VAR_INVALID_NAME", - "count" : 3 -}, { - "severity" : "INFO", - "count" : 3 -} ] \ No newline at end of file +{ + "issues" : [ { + "severity" : "INFO", + "id" : "VAR_INVALID_NAME", + "message" : "VAR_INVALID_NAME", + "category" : "CFLINT", + "abbrev" : "VI", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/Naming/nameEndsInNumberScript.cfc", + "fileName" : "nameEndsInNumberScript.cfc", + "function" : "test", + "column" : 0, + "line" : 3, + "message" : "Variable name_1 is not a valid name. Please use CamelCase or underscores.", + "variable" : "name_1", + "expression" : "" + } ] + }, { + "severity" : "INFO", + "id" : "VAR_INVALID_NAME", + "message" : "VAR_INVALID_NAME", + "category" : "CFLINT", + "abbrev" : "VI", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/Naming/nameEndsInNumberScript.cfc", + "fileName" : "nameEndsInNumberScript.cfc", + "function" : "test", + "column" : 0, + "line" : 4, + "message" : "Variable name2 is not a valid name. Please use CamelCase or underscores.", + "variable" : "name2", + "expression" : "" + } ] + }, { + "severity" : "INFO", + "id" : "VAR_INVALID_NAME", + "message" : "VAR_INVALID_NAME", + "category" : "CFLINT", + "abbrev" : "VI", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/Naming/nameEndsInNumberScript.cfc", + "fileName" : "nameEndsInNumberScript.cfc", + "function" : "test", + "column" : 0, + "line" : 5, + "message" : "Variable name1 is not a valid name. Please use CamelCase or underscores.", + "variable" : "name1", + "expression" : "" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "VAR_INVALID_NAME", + "count" : 3 + } ], + "countBySeverity" : [ { + "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 7c60a4ffe..3db81d2d6 100644 --- a/src/test/resources/com/cflint/tests/Naming/tempVar.expected.txt +++ b/src/test/resources/com/cflint/tests/Naming/tempVar.expected.txt @@ -1,27 +1,31 @@ -[ { - "severity" : "INFO", - "id" : "VAR_IS_TEMPORARY", - "message" : "VAR_IS_TEMPORARY", - "category" : "CFLINT", - "abbrev" : "VI", - "locations" : [ { - "file" : "src/test/resources/com/cflint/tests/Naming/tempVar.cfc", - "fileName" : "tempVar.cfc", - "function" : "foo", - "column" : 0, - "line" : 3, - "message" : "Temporary variable tempStruct could be named better.", - "variable" : "tempStruct", - "expression" : "" - } ] -}, { - "totalfiles" : 0 -}, { - "totalsize" : 0 -}, { - "code" : "VAR_IS_TEMPORARY", - "count" : 1 -}, { - "severity" : "INFO", - "count" : 1 -} ] \ No newline at end of file +{ + "issues" : [ { + "severity" : "INFO", + "id" : "VAR_IS_TEMPORARY", + "message" : "VAR_IS_TEMPORARY", + "category" : "CFLINT", + "abbrev" : "VI", + "locations" : [ { + "file" : "src/test/resources/com/cflint/tests/Naming/tempVar.cfc", + "fileName" : "tempVar.cfc", + "function" : "foo", + "column" : 0, + "line" : 3, + "message" : "Temporary variable tempStruct could be named better.", + "variable" : "tempStruct", + "expression" : "" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "VAR_IS_TEMPORARY", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 78cffb36e..c5221503a 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,27 +1,31 @@ -[ { - "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 +{ + "issues" : [ { + "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()" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "PACKAGE_CASE_MISMATCH", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 475bd6d7e..41b44bf15 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,27 +1,31 @@ -[ { - "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 +{ + "issues" : [ { + "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" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "PACKAGE_CASE_MISMATCH", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 99fd3beb6..ee1366c41 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,27 +1,31 @@ -[ { - "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 +{ + "issues" : [ { + "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')" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "PACKAGE_CASE_MISMATCH", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 cceaec958..e190a2757 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,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/ParseError/cfloop_359.expected.txt b/src/test/resources/com/cflint/tests/ParseError/cfloop_359.expected.txt index ff34de20d..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/ParseError/cfloop_359.expected.txt +++ b/src/test/resources/com/cflint/tests/ParseError/cfloop_359.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/ParseError/fileoutput_359.expected.txt b/src/test/resources/com/cflint/tests/ParseError/fileoutput_359.expected.txt index ff34de20d..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/ParseError/fileoutput_359.expected.txt +++ b/src/test/resources/com/cflint/tests/ParseError/fileoutput_359.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/ParseError/outside_output_359.expected.txt b/src/test/resources/com/cflint/tests/ParseError/outside_output_359.expected.txt index ff34de20d..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/ParseError/outside_output_359.expected.txt +++ b/src/test/resources/com/cflint/tests/ParseError/outside_output_359.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/ParseError/singlequote_359.expected.txt b/src/test/resources/com/cflint/tests/ParseError/singlequote_359.expected.txt index ff34de20d..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/ParseError/singlequote_359.expected.txt +++ b/src/test/resources/com/cflint/tests/ParseError/singlequote_359.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 cceaec958..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/Parsing/Underscore.expected.txt +++ b/src/test/resources/com/cflint/tests/Parsing/Underscore.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ No newline at end of file diff --git a/src/test/resources/com/cflint/tests/Parsing/parsing251.expected.txt b/src/test/resources/com/cflint/tests/Parsing/parsing251.expected.txt index cceaec958..e190a2757 100644 --- a/src/test/resources/com/cflint/tests/Parsing/parsing251.expected.txt +++ b/src/test/resources/com/cflint/tests/Parsing/parsing251.expected.txt @@ -1,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 e54b94e12..1eb379962 100644 --- a/src/test/resources/com/cflint/tests/Parsing/parsing253.expected.txt +++ b/src/test/resources/com/cflint/tests/Parsing/parsing253.expected.txt @@ -1,27 +1,31 @@ -[ { - "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 +{ + "issues" : [ { + "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" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "MISSING_VAR", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 cceaec958..e190a2757 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,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 cceaec958..e190a2757 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,5 +1,9 @@ -[ { - "totalfiles" : 0 -}, { - "totalsize" : 0 -} ] \ No newline at end of file +{ + "issues" : [ ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ ], + "countBySeverity" : [ ] + } +} \ 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 6380cf46c..aecd6aef8 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,27 +1,31 @@ -[ { - "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 +{ + "issues" : [ { + "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" + } ] + } ], + "summary" : { + "totalfiles" : 0, + "totalsize" : 0, + "countByCode" : [ { + "code" : "CFQUERYPARAM_REQ", + "count" : 1 + } ], + "countBySeverity" : [ { + "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 5f2b7b65d..2396dd02e 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,27 +1,31 @@ -[ { - "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