-
Notifications
You must be signed in to change notification settings - Fork 1
JSON Output: Java
Bryce edited this page Oct 19, 2019
·
4 revisions
Below is the outline of JSON object outputs for Java:
Per repo file the JSON structure will look like this:
{
"repoURL": "<git user>/<repo name>/branches/master",
"package": true/false,
"filename": "<file name>",
"import": true/falsee,
"class": {
"blank_lines": true/false,
"methods": {
"variables": {
"naming": {
"other": <number>, # of variables named using any other style
"lower_snake_case": <number>, # of variables named using lower_snake_case style
"google": <number> # of variables named using google style
}
},
"indents": {
"tabs": <number>, # of occurrences of tab characters (\t)
"spaces": <number>, # times spaces were used for indents
"min_indent": <number>, # min_indent encountered. if not applicable, N/A
"avg_indent": <number>, The average number of spaces used for an indent. N/A if no spaces were used.
"max_indent": <number> The max_indent encountered. if not applicable, N/A
},
"line_length": [
<number>,
<number>
],
"naming": {
"other": <number>, # of methods named using any other style
"lower_snake_case": <number>, # of methods named using lower_snake_casestyle
"google": <number> # of methods named using google style
},
"curly_braces": {
"single": {
"other": <number>, # of occurrences
"allman": <number>, # of occurrences
"ex_kr": <number>, # of occurrences
"google": <number> # of occurrences
},
"multiple": {
"other": <number>, # of occurrences
"allman": <number>, # of occurrences
"ex_kr": <number>, # of occurrences
"google": <number> # of occurrences
}
}
},
"naming": {
"other": <number>, # of classes named using any other style
"google": <number> # of classes named using google style
},
"constants": {
"naming": {
"other": <number>, # of constants named using any other style
"google": <number> # of constants named using google style
}
},
"fields": {
"naming": {
"other": <number>, # of fields named using any other style
"lower_snake_case": <number>, # of fields named using lower_snake_casestyle
"google": <number> # of fields named using google style
}
}
}
}
The JSON structure summary for the entire java analysis will look like this:
{
"methodsNamingGoogle": 213,
"methodsCurlyBracesSingleAllman": 0,
"methodsNamingLowerSnake": 0,
"methodsIndentsMinIndent": 60,
"methodsCurlyBracesMultipleExKr": 1,
"fieldsNamingOther": 55,
"namingGoogle": 50,
"methodsCurlyBracesMultipleAllman": 0,
"methodsNamingOther": 0,
"fieldsNamingGoogle": 3,
"methodsCurlyBracesMultipleGoogle": 47,
"totalFiles": 114,
"methodsIndentsMaxIndent": 88,
"repoUrl": "kramsey458/StreakerGame/branches/master",
"linesOfCodes": 2899,
"methodsIndentsTabs": 1334,
"methodsVariableLowerSnake": 0,
"methodsIndentsSpaces": 1341,
"methodsVariableOther": 0,
"fieldsNamingLowerSnake": 0,
"methodsCurlyBracesSingleOther": 0,
"methodsVariablesGoogle": 0,
"methodsLineLength": 24,
"methodsCurlyBracesMultipleOther": 0,
"constantsNamingOther": 46,
"methodsCurlyBracesSingleGoogle": 23,
"methodsIndentsAvgIndent": 23,
"constantsNamingGoogle": 0,
"methodsCurlyBracesSingleExKr": 0,
"namingOther": 0
}