Showing 34 of 4,910 total issues
File main.js
has 574 lines of code (exceeds 250 allowed). Consider refactoring. Open
require.config({
paths: {
bootstrap: './vendor/bootstrap.min',
diffMatchPatch: './vendor/diff_match_patch.min',
handlebars: './vendor/handlebars.min',
Function AppTooltip
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
function AppTooltip(app, clk=true) {
var tooltip = $('#app-tooltip');
var lock = null;
var connectors = $('.svg-pan-zoom_viewport .conector_h');
Function sendSampleRequest
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
function sendSampleRequest(group, name, version, type)
{
var $root = $('article[data-group="' + group + '"][data-name="' + name + '"][data-version="' + version + '"]');
// Optional header
Function AnimateLines
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
function AnimateLines(app) {
var color = "#6b2626";
var actived = false;
var tooltip = $('#conn-tooltip');
Function UploaderRepository
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
const UploaderRepository = () => {
factoryValid(
_.pick(process.env, ['AWS_S3_BUCKET_NAME', 'AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY']),
s3Valid
Function AnimateLines
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function AnimateLines(app) {
var color = "#6b2626";
var actived = false;
var tooltip = $('#conn-tooltip');
- 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 changeVersionCompareTo
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function changeVersionCompareTo(e) {
e.preventDefault();
var $root = $(this).parents('article');
var selectedVersion = $(this).html();
Function _handlebarsEachCompared
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _handlebarsEachCompared(fieldname, source, compare, options)
{
var dataList = [];
var index = 0;
if(source) {
Function ApplicationReport
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ApplicationReport = (Entity, PersistenceServices = DPersistenceServices, FUploadService = DUploaderService) => {
const UploadService = FUploadService;
return {
Function UploaderRepository
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
const UploaderRepository = () => {
const appRoot = getPwdPath();
const base = process.env.LOCAL_DIR || LOCAL_DIR_DEFAULT;
Function find
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Query.prototype.find = function (query, options) {
let Model = this.model;
query = _.assign({}, this.query, query);
Function UploaderService
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
const UploaderService = (Entity, owner, ext = 'html', dfolder='graphs-bussiness') => {
const typeU = process.env.MAESTRO_UPLOAD_TYPE || TYPE_DEFAULT;
const FUploaderRepository = require(`core/repositories/uploader${typeU}Repository`);
const UploaderRepository = FUploaderRepository(Entity.name);
Function add_nav
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function add_nav(nav, content, index) {
var found_level1 = false;
if ( ! content) {
return found_level1;
}
Function pathToRegexp
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function pathToRegexp (path, keys, options) {
keys = keys || [];
if (!isArray(keys)) {
options = keys;
- 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 HTTPService
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const HTTPService = (url) => (header = {}) => {
const factoryRequest = (caller, path, args) => {
return new Promise((resolve, reject) => {
return Connector(url, header)[caller](path, args)
- 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 validateFile
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
const validateFile = (file, opts) => {
const defaultParams = {
maxsize: 1630240, //~1 mb,
minsize: 1024, // 1 kbs
Function MenuBar
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MenuBar() {
function hist(result) {
var arr = []
var hist = _.get(result, 'info.histograms');
Function HTTPService
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
const HTTPService = (url) => (header = {}) => {
const factoryRequest = (caller, path, args) => {
return new Promise((resolve, reject) => {
return Connector(url, header)[caller](path, args)
Function replacePath
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function replacePath (path, keys) {
var index = 0;
function replace (_, escaped, prefix, key, capture, group, suffix, escape) {
if (escaped) {
- 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 forEach
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Array.prototype.forEach = function (callback, thisArg) {
var T, k;
if (this == null) {
throw new TypeError(' this is null or not defined');
- 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"