talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

Function initTemplates has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    initTemplates : function() {
        var templates = this.templates || {},
            template, name,
            
            headerCellTpl = new Ext.Template(
Severity: Minor
Found in app/assets/javascripts/ext/src/widgets/grid/GridView.js - About 1 hr to fix

    Function getNodes has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function getNodes(ns, mode, tagName){
            var result = [], ri = -1, cs;
            if(!ns){
                return result;
            }
    Severity: Minor
    Found in app/assets/javascripts/ext/src/ext-core/src/core/DomQuery.js - About 1 hr to fix

      Function showEditWindow has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        showEditWindow: function(){
          var win = new Ext.Window({
            title: 'Edit RSS Portlet',
            layout: 'border',
            items: [{ xtype: 'container', region: 'north', layout: 'form', itemId: 'north', height: 60, margins: '5px 5px 0px', items: [
      Severity: Minor
      Found in app/assets/javascripts/dashboard/cms/portlets/rss.js - About 1 hr to fix

        Function val has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            val: function( value ) {
                if ( value == undefined ) {
        
                    if ( this.length ) {
                        var elem = this[0];
        Severity: Minor
        Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js - About 1 hr to fix

          Function remove has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              remove: function(elem, types, handler) {
                  // don't do events on text and comment nodes
                  if ( elem.nodeType == 3 || elem.nodeType == 8 )
                      return;
          
          
          Severity: Minor
          Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js - About 1 hr to fix

            Method processAcknowledgmentStatus has 44 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def processAcknowledgmentStatus alert, rcptStatus = nil, time_offset = 0
                return false if rcptStatus.nil? || rcptStatus['id'].blank?
            
                user = User.find_by_id(rcptStatus['id'])
                if user.nil?
            Severity: Minor
            Found in lib/workers/query_swn_for_acknowledgments_worker.rb - About 1 hr to fix

              Function compile has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  compile : function(){
                      var me = this,
                          fm = Ext.util.Format,
                          useF = me.disableFormats !== true,
                          sep = Ext.isGecko ? "+" : ",",
              Severity: Minor
              Found in app/assets/javascripts/ext/src/core/Template-more.js - About 1 hr 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 buildExtractors has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  buildExtractors : function() {
                      if(this.ef){
                          return;
                      }
                      var s = this.meta, Record = this.recordType,
              Severity: Minor
              Found in app/assets/javascripts/ext/src/data/JsonReader.js - About 1 hr 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 setActiveItem has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  setActiveItem : function(item, suppressEvent){
                      if(!Ext.isObject(item)){
                          item = this.menu.getComponent(item);
                      }
                      if(item){
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/CycleButton.js - About 1 hr 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 selectPrevious has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  selectPrevious : function(/* private */ s){
                      if(!(s = s || this.selNode || this.lastSelNode)){
                          return null;
                      }
                      // Here we pass in the current function to select to indicate the direction we're moving
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/tree/TreeSelectionModel.js - About 1 hr 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 doLayout has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  doLayout : function(shallow, force){
                      var rendered = this.rendered,
                          forceLayout = force || this.forceLayout;
              
                      if(this.collapsed || !this.canLayout()){
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/Container.js - About 1 hr 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 initList has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  initList : function(){
                      if(!this.list){
                          var cls = 'x-combo-list',
                              listParent = Ext.getDom(this.getListParent() || Ext.getBody());
              
              
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/form/Combo.js - About 1 hr 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 handleOverflow has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  handleOverflow: function(calculations, targetSize) {
                      this.showTrigger();
                      
                      var newWidth    = targetSize.width - this.afterCt.getWidth(),
                          boxes       = calculations.boxes,
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/layout/box/MenuOverflow.js - About 1 hr 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 layout has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  layout : function(initial) {
                      if (!this.mainBody) {
                          return; // not rendered
                      }
              
              
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/grid/GridView.js - About 1 hr 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 renderItem has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  renderItem : function(c, position, target){
                      if (!this.itemTpl) {
                          this.itemTpl = Ext.layout.MenuLayout.prototype.itemTpl = new Ext.XTemplate(
                              '<li id="{itemId}" class="{itemCls}">',
                                  '<tpl if="needsIcon">',
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/layout/MenuLayout.js - About 1 hr 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 buildHeaders has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  buildHeaders: function() {
                      var tuples     = this.getTuples(),
                          rowCount   = tuples.length,
                          dimensions = this.dimensions,
                          colCount   = dimensions.length,
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/grid/PivotAxis.js - About 1 hr 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 setElementSize has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  setElementSize : function(s, newSize, onComplete){
                      if(s.orientation == Ext.SplitBar.HORIZONTAL){
                          if(!s.animate){
                              s.resizingEl.setWidth(newSize);
                              if(onComplete){
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/SplitBar.js - About 1 hr 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 showMenu has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  showMenu : function(item) {
                      var menu = item.child('ul'),
                          x = y = 0;
              
                      item.select('>a').addClass('ux-menu-link-hover');
              Severity: Minor
              Found in app/assets/javascripts/ext/src/ext-core/examples/menu/menu.js - About 1 hr 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 expandRow has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  expandRow : function(record, skip_process)
                  {
                      var ds = this.ds,
                          i, len, row, pmel, children, index, child_index;
                      
              Severity: Minor
              Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 1 hr 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 expandRow has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  expandRow : function(record, skip_process)
                  {
                      var ds = this.ds,
                          i, len, row, pmel, children, index, child_index;
                      
              Severity: Minor
              Found in app/assets/javascripts/ext_extensions/TreeGrid/src/GridView.js - About 1 hr 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

              Severity
              Category
              Status
              Source
              Language