Showing 243 of 409 total issues
Function mainPage
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
AppBackend.prototype.mainPage = function mainPage(req, offlineMode, opts){
opts = opts||{};
if(!opts.icons){
if(!opts.icon){
opts.icons={
Function coreFunction
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
coreFunction:async function(context,parameters){
var {be} = context;
var {db} = be;
var tableName = parameters.table;
var rows = await be.inTransaction(null, async function(client){
Function tipoCeldas
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
tipoCeldas(){
//var tiposCeldas = {
return {
titulo:{
completar: function completar(){
Function doneFun
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
menuOptions.push({img:my.path.img+'show-hide-columns.png', value:true, label: my.messages.hideOrShow, doneFun:function(){
dialogPromise(function(dialogWindow, closeWindow){
var button=html.button({class:'hide-or-show'},'ok').create();
var createSelectElement=function createSelectElement(columns,hideOrShowId,disabledItems){
var selectElement=html.select(
Function tableGrid
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
myOwn.tableGrid = function tableGrid(tableName, mainElement, opts){
var my = this;
var grid = new my.TableGrid({my: this}, mainElement);
opts = opts || {};
grid.detailingForUrl=opts.detailingForUrl;
- 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 mainPage
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
AppBackend.prototype.mainPage = function mainPage(req, offlineMode, opts){
opts = opts||{};
if(!opts.icons){
if(!opts.icon){
opts.icons={
- 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 depotRefresh
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
grid.depotRefresh = function depotRefresh(depot,result,opts){
// ¡ATENCIÓN!: esta función no debe despleegar, llama a updateRowData, ahí se despliega
opts=opts||{};
upadteNumberOfRows(depot,grid);
var retrievedRow = result.updatedRow;
Function showPage
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
myOwn.showPage = function showPage(pageDef){
my.prepareFloating3dots();
var newHash;
if(!location.hash){
newHash=sessionStorage.getItem('backend-plus-hash-redirect');
Consider simplifying this complex logical expression. Open
if(resultTableDef.sql.policies.enabled==null){
var pol = resultTableDef.sql.policies;
pol.enabled = (
pol.all.using || pol.select.using || pol.insert.using || pol.update.using || pol.delete.using ||
pol.all.check || pol.select.check || pol.insert.check || pol.update.check || pol.delete.check ||
Function createRowElements
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
grid.createRowElements = function createRowElements(iRow, depot){
var grid = this;
var forInsert = iRow>=0;
var tr={};
depot.colNumber = null;
Function presentarPlaca
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function presentarPlaca(estado) {
agregaLogoAlElemento(pantalla);
var textoComienzaEncuesta=estado.estructura.textos.placas['bienvenido-'+estado.estado];
var encabezado=textoComienzaEncuesta.encabezado;
var parrafos=textoComienzaEncuesta.parrafos;
WebsqlDb
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
export class WebsqlDb{
private db:Database;
private wait4detectedFeatures:Promise<DetectFeatures>;
constructor(public name:string){
var version = 1.0;
Function BindMemoryPerodicallySaved
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
function BindMemoryPerodicallySaved(be){
return (
/**
* @param {Express.Session} session
*/
Function coreFunction
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
coreFunction:async function(context, parameters){
var be=context.be;
var db=be.db;
var tableDef=be.tableStructures[parameters.table](context);
var tableDefArray = [tableDef].concat(tableDef.offline.details.map(name=>be.tableStructures[name](context)));
Function agregar_json
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function agregar_json(div, o, ubicaciones=agregar_json_default_ubicaciones){
if(o == null){
return ;
}
if(typeof o == "object" && !(o instanceof Date) && !o.isRealDateTime){
Function createRowInsertElements
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
myOwn.TableGrid.prototype.createRowInsertElements = function createRowInsertElements(aboveDepot, belowDepot){
var grid = this;
if(!belowDepot){
if(aboveDepot){
if(belowDepot=aboveDepot.tr.previousSibling){
- 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 prepareGrid
has a Cognitive Complexity of 18 (exceeds 5 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){
- 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 dialogUpload
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
myOwn.dialogUpload = function dialogUpload(ajaxPath, ajaxParams, ajaxPrepareResultFun, showWithMiniMenu, messages, refresheable, acceptPhotos, optsNames){
messages = changing(my.messages, messages||{})
optsNames = optsNames || [];
var doneFun = function doneFun(){
var fileAttr={class:'import-button',type:'file',style:'min-width:400px'};
- 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 MemoryPerodicallySaved
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MemoryPerodicallySaved(session){
var MemoryStoreConstructor = memorystore(session);
class MemoryDevelConstructor extends MemoryStoreConstructor{
/**
* @param {memorystore.MemoryConsOpts} opts
Function displayRows
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
grid.displayRows = function displayRows(fromRowNumber, toRowNumber, adding){
var grid = this;
if(!adding){
if(grid.vertical){
// recorrer todos los tr del tbody y dejar solo las primeras columnas?