File analyzer.tableBuilder.js
has 361 lines of code (exceeds 250 allowed). Consider refactoring. Open
var logLoaded = false;
var filesDataTable = null;
var numberItemsInFilter;
var data = "";
Function buildTable
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
function buildTable(data) {
window.filesDataTable = $('#filesTable').dataTable({
"order": [[ 0, "desc" ]],
"aLengthMenu": [[100, 10, 500, -1], [100, 10, 500, "All"]],
Consider simplifying this complex logical expression. Open
if ( ( minDateStr == '' && '' == maxDateStr ) ||
( minDateStr == '' && date <= maxDate ) ||
( minDate <= date && '' == maxDateStr ) ||
( minDate <= date && date <= maxDate ) )
{
Function base64_decode
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function base64_decode(data) {
if (!data)
return "";
// discuss at: http://phpjs.org/functions/base64_decode/
Function parseWebsiteLog
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function parseWebsiteLog(fileDictDict) {
var fileInfoArrayArray = new Array;
for(var fileDictName in fileDictDict) {
var fileInfoArray = new Array;
var fileDict = fileDictDict[fileDictName];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function parseWebsiteLog
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseWebsiteLog(fileDictDict) {
var fileInfoArrayArray = new Array;
for(var fileDictName in fileDictDict) {
var fileInfoArray = new Array;
var fileDict = fileDictDict[fileDictName];
Function displayContents
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function displayContents(xmlStr) {
if (logLoaded) {
//loading filters from files
new_json = "";
signature = xmlStr.substring(0, 16).replace(/\s/, '');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function base64_decode
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function base64_decode(data) {
if (!data)
return "";
// discuss at: http://phpjs.org/functions/base64_decode/
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function buildTable
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function buildTable(data) {
window.filesDataTable = $('#filesTable').dataTable({
"order": [[ 0, "desc" ]],
"aLengthMenu": [[100, 10, 500, -1], [100, 10, 500, "All"]],
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"