appbaseio/mirage

View on GitHub

Showing 357 of 7,143 total issues

Function addPane has 119 lines of code (exceeds 25 allowed). Consider refactoring.
Open

,    addPane = function (pane, force) {
        if ( !force && !isInitialized() ) return;
        var
            o        = options[pane]
        ,    s        = state[pane]
Severity: Major
Found in assets/vendor/jquery.layout/jquery.layout.js - About 4 hrs to fix

    AppComponent has 36 functions (exceeds 20 allowed). Consider refactoring.
    Open

    @Component({
      selector: "my-app",
      templateUrl: "./app/app.component.html",
      providers: [AppbaseService, StorageService, DocService]
    })
    Severity: Minor
    Found in app/app.component.ts - About 4 hrs to fix

      Function sizeHandles has 113 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      ,    sizeHandles = function (evt_or_panes) {
              var panes = evtPane.call(this, evt_or_panes)
              panes = panes ? panes.split(",") : _c.borderPanes;
      
              $.each(panes, function (i, pane) {
      Severity: Major
      Found in assets/vendor/jquery.layout/jquery.layout.js - About 4 hrs to fix

        Function sizePane has 111 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        ,    sizePane = function (evt_or_pane, size, skipCallback, noAnimation, force) {
                if (!isInitialized()) return;
                var    pane    = evtPane.call(this, evt_or_pane) // probably NEVER called from event?
                ,    o        = options[pane]
                ,    s        = state[pane]
        Severity: Major
        Found in assets/vendor/jquery.layout/jquery.layout.js - About 4 hrs to fix

          Function sizeMidPanes has 105 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          ,    sizeMidPanes = function (panes, skipCallback, force) {
                  panes = (panes ? panes : "east,west,center").split(",");
          
                  $.each(panes, function (i, pane) {
                      if (!$Ps[pane]) return; // NO PANE - skip
          Severity: Major
          Found in assets/vendor/jquery.layout/jquery.layout.js - About 4 hrs to fix

            Function _create has 103 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _create: function() {
                    this.originalTitle = this.element.attr( "title" );
                    // #5742 - .attr() might return a DOMElement
                    if ( typeof this.originalTitle !== "string" ) {
                        this.originalTitle = "";
            Severity: Major
            Found in assets/vendor/jquery.layout/jquery-ui.js - About 4 hrs to fix

              Consider simplifying this complex logical expression.
              Open

                          if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
                              if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
                              inst.snapElements[i].snapping = false;
                              continue;
                          }
              Severity: Critical
              Found in assets/vendor/jquery.layout/jquery-ui.js - About 4 hrs to fix

                Function initOptions has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                ,    initOptions = function () {
                        var data, d, pane, key, val, i, c, o;
                
                        // reprocess user's layout-options to have correct options sub-key structure
                        opts = $.layout.transformData( opts, true ); // panes = default subkey
                Severity: Major
                Found in assets/vendor/jquery.layout/jquery.layout.js - About 4 hrs to fix

                  Function swapPanes has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  ,    swapPanes = function (evt_or_pane1, pane2) {
                          if (!isInitialized()) return;
                          var pane1 = evtPane.call(this, evt_or_pane1);
                          // change state.edge NOW so callbacks can know where pane is headed...
                          state[pane1].edge = pane2;
                  Severity: Major
                  Found in assets/vendor/jquery.layout/jquery.layout.js - About 3 hrs to fix

                    Function changeType has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      changeType(val) {
                        //this.mapping.resultQuery.result = [];
                        var availableFields: any = [];
                        var propInfo: any;
                        var allMappings = this.mapping[this.config.appname].mappings;
                    Severity: Major
                    Found in app/queryBlocks/types/types.component.ts - About 3 hrs to fix

                      Function 1 has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                      Open

                      (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
                      'use strict'
                      
                      exports.byteLength = byteLength
                      exports.toByteArray = toByteArray
                      Severity: Minor
                      Found in assets/vendor/urlsafe-base64.bundle.js - About 3 hrs to fix

                      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 checkAvailableFields has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                      Open

                          checkAvailableFields() {
                              var fields = this.allFields;
                              var allMappings = this.mapping[this.config.appname].mappings;
                              if (this.joiningQuery[this.joiningQueryParam] == 'nested') {
                                  var mapObj = {};
                      Severity: Minor
                      Found in app/queryBlocks/singlequery/singlequery.component.ts - About 3 hrs to fix

                      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 _create has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          _create: function() {
                      
                              var that = this, o = this.options;
                              this.element.addClass("ui-resizable");
                      
                      
                      Severity: Major
                      Found in assets/vendor/jquery.layout/jquery-ui.js - About 3 hrs to fix

                        Function initHandles has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        ,    initHandles = function (panes) {
                                panes = panes ? panes.split(",") : _c.borderPanes;
                        
                                // create toggler DIVs for each pane, and set object pointers for them, eg: $R.north = north toggler DIV
                                $.each(panes, function (i, pane) {
                        Severity: Major
                        Found in assets/vendor/jquery.layout/jquery.layout.js - About 3 hrs to fix

                          Function 1 has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
                          'use strict'
                          
                          exports.byteLength = byteLength
                          exports.toByteArray = toByteArray
                          Severity: Major
                          Found in assets/vendor/urlsafe-base64.bundle.js - About 3 hrs to fix

                            Function _keydown has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                _keydown: function( event ) {
                                    var match, prev, character, skip, regex,
                                        preventDefault = true;
                            
                                    function escape( value ) {
                            Severity: Major
                            Found in assets/vendor/jquery.layout/jquery-ui.js - About 3 hrs to fix

                              Function _create has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  _create: function() {
                                      var accordionId = this.accordionId = "ui-accordion-" +
                                              (this.element.attr( "id" ) || ++uid),
                                          options = this.options;
                              
                              
                              Severity: Major
                              Found in assets/vendor/jquery.layout/jquery-ui.js - About 3 hrs to fix

                                Function Datepicker has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function Datepicker() {
                                    this.debug = false; // Change this to true to start debugging
                                    this._curInst = null; // The current instance in use
                                    this._keyEvent = false; // If the last event was a key event
                                    this._disabledInputs = []; // List of date picker inputs that have been disabled
                                Severity: Major
                                Found in assets/vendor/jquery.layout/jquery-ui.js - About 3 hrs to fix

                                  Function open has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  ,    open = function (evt_or_pane, slide, noAnimation, noAlert) {
                                          if (!isInitialized()) return;
                                          var    pane = evtPane.call(this, evt_or_pane)
                                          ,    $P    = $Ps[pane]
                                          ,    $R    = $Rs[pane]
                                  Severity: Major
                                  Found in assets/vendor/jquery.layout/jquery.layout.js - About 2 hrs to fix

                                    Function 3 has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    },{"base64-js":1,"ieee754":3,"isarray":4}],3:[function(require,module,exports){
                                    exports.read = function (buffer, offset, isLE, mLen, nBytes) {
                                      var e, m
                                      var eLen = nBytes * 8 - mLen - 1
                                      var eMax = (1 << eLen) - 1
                                    Severity: Major
                                    Found in assets/vendor/urlsafe-base64.bundle.js - About 2 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language