Showing 242 of 408 total issues
File backend-plus.js
has 3029 lines of code (exceeds 250 allowed). Consider refactoring. Open
/// <reference path="./in-backend-plus.d.ts" />
"use strict";
var backendPlus = {};
File my-tables.js
has 2997 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use strict";
/*global myOwn, my, XLSX, Pikaday */
/*global miniMenuPromise, dialogPromise, alertPromise, confirmPromise, promptPromise, simpleFormPromise */
/*global Blob, document, CustomEvent, URL */
Function displayGrid
has a Cognitive Complexity of 208 (exceeds 5 allowed). Consider refactoring. Open
myOwn.TableGrid.prototype.displayGrid = function displayGrid(){
var grid = this;
var tbody = grid.dom.table.tBodies[0];
grid.updateRowData = function updateRowData(depot, skipUpdateStatus){
var grid = this;
- 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 dumpDbSchemaPartial
has a Cognitive Complexity of 161 (exceeds 5 allowed). Consider refactoring. Open
AppBackend.prototype.dumpDbSchemaPartial = async function dumpDbSchemaPartial(partialTableStructures, opts = {}){
var complete = opts.complete;
var be = this;
var db=be.db;
db.quoteInteger = function quoteInteger(integerValue){
- 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
File procedures-table.js
has 1256 lines of code (exceeds 250 allowed). Consider refactoring. Open
// @ts-check
"use strict";
var {datetime, changing, coalesce, splitRawRowIntoRow} = require('best-globals');
var XLSX = require('xlsx');
Function start
has 633 lines of code (exceeds 25 allowed). Consider refactoring. Open
AppBackend.prototype.start = function start(opts){
var be = this;
this.getTables().forEach(
// TODO: quitar, no debería hacer falta poner esto acá
/**
Function dumpDbSchemaPartial
has 437 lines of code (exceeds 25 allowed). Consider refactoring. Open
AppBackend.prototype.dumpDbSchemaPartial = async function dumpDbSchemaPartial(partialTableStructures, opts = {}){
var complete = opts.complete;
var be = this;
var db=be.db;
db.quoteInteger = function quoteInteger(integerValue){
Function displayGrid
has 420 lines of code (exceeds 25 allowed). Consider refactoring. Open
myOwn.TableGrid.prototype.displayGrid = function displayGrid(){
var grid = this;
var tbody = grid.dom.table.tBodies[0];
grid.updateRowData = function updateRowData(depot, skipUpdateStatus){
var grid = this;
Function coreFunction
has 407 lines of code (exceeds 25 allowed). Consider refactoring. Open
coreFunction:async function(context, parameters, files){
var be=context.be;
var doing="opening file";
var skipUnknownFieldsAtImport = coalesce(parameters.skipUnknownFieldsAtImport, be.config.skipUnknownFieldsAtImport);
/** @type {string[]} */
Function coreFunction
has a Cognitive Complexity of 100 (exceeds 5 allowed). Consider refactoring. Open
coreFunction:async function(context, parameters, files, opts){
var be=context.be;
var mainDefTable=be.tableStructures[parameters.table](context);
var action=parameters.status=='new'?'insert':'update';
if(!mainDefTable.allow[action] && (!opts || !opts.forImport)){
- 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
File my-things.js
has 809 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use strict";
/// <reference path="../node_modules/types.d.ts/modules/typed-controls/index.d.ts" />
//no/ <reference path="../node_modules/types.d.ts/modules/dialog-promise/index.d.ts" />
/// <reference path="../node_modules/types.d.ts/modules/codenautas-umd/index.d.ts" />
Function addProcedureServices
has 327 lines of code (exceeds 25 allowed). Consider refactoring. Open
AppBackend.prototype.addProcedureServices = function addProcedureServices(forUnlogged){
var be = this;
if(forUnlogged){
var app = express();
}else{
Function tableDefAdapt
has 307 lines of code (exceeds 25 allowed). Consider refactoring. Open
function tableDefAdapt(tableDef, context){
var be = this;
var fieldDomain = be.fieldDomain || {};
if(false && !be.fieldDomain){
throw new Error('lack of fieldDomain in backend. postConfig must call super.postConfig');
Function tableDefAdapt
has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring. Open
function tableDefAdapt(tableDef, context){
var be = this;
var fieldDomain = be.fieldDomain || {};
if(false && !be.fieldDomain){
throw new Error('lack of fieldDomain in backend. postConfig must call super.postConfig');
- 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
File my-menu.js
has 630 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use strict";
// require('lazy-some').bindToPrototypeIn(Array);
var changing = require('best-globals').changing;
myOwn.wScreens={}
File my-ajax.js
has 604 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use strict";
(function codenautasModuleDefinition(root, name, factory) {
/* global define */
/* istanbul ignore next */
if(typeof root.globalModuleName !== 'string'){
Function ajaxPromise
has 227 lines of code (exceeds 25 allowed). Consider refactoring. Open
myAjax.ajaxPromise = function ajaxPromise(procedureDef,data,opts){
opts = opts || {};
if(!('visiblyLogErrors' in opts)){
opts.visiblyLogErrors=true;
}
Function prepareGrid
has 224 lines of code (exceeds 25 allowed). Consider refactoring. Open
myOwn.TableGrid.prototype.prepareGrid = function prepareGrid(){
var grid = this;
var my = grid.my;
grid.view.hiddenColumns=grid.view.hiddenColumns||grid.def.hiddenColumns||[];
grid.def.fields.forEach(function(fieldDef){
Function coreFunction
has 211 lines of code (exceeds 25 allowed). Consider refactoring. Open
coreFunction:async function(context, parameters, files, opts){
var be=context.be;
var mainDefTable=be.tableStructures[parameters.table](context);
var action=parameters.status=='new'?'insert':'update';
if(!mainDefTable.allow[action] && (!opts || !opts.forImport)){
Function addUnloggedServices
has 197 lines of code (exceeds 25 allowed). Consider refactoring. Open
AppBackend.prototype.addUnloggedServices = function addUnloggedServices(mainApp, baseUrl){
var be=this;
if(be.config.login.forget?.urlPath){
mainApp.get(Path.posix.join(baseUrl,be.config.login.forget.urlPath), be.config.login.plus.newPassPageServe)
mainApp.get(Path.posix.join(baseUrl,be.config.login.forget.urlPathOk), be.config.login.plus.newPassPageServe2)