talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

Function _createStoreAndDataView has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  _createStoreAndDataView: function(){
    this.store = new Ext.data.Store({
      autoDestroy: true,
      autoLoad: false,
      autoSave: false,
Severity: Minor
Found in app/assets/javascripts/profile/RolesControl.js - About 1 hr to fix

    Function onFire has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        var onFire = function(e, isDrop){
            if(isDrop || !ddm.dragCurrent){ return; }
            var dds = Ext.dd.ScrollManager;
            if(!dragEl || dragEl != ddm.dragCurrent){
                dragEl = ddm.dragCurrent;
    Severity: Minor
    Found in app/assets/javascripts/ext/src/dd/ScrollManager.js - About 1 hr to fix

      Function buildExtractors has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          buildExtractors : function() {
              if(this.ef){
                  return;
              }
              var s       = this.meta,
      Severity: Minor
      Found in app/assets/javascripts/ext/src/data/XmlReader.js - About 1 hr to fix

        Function bindStore has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            bindStore : function(store, initial){
                if(this.store && !initial){
                    if(this.store !== store && this.store.autoDestroy){
                        this.store.destroy();
                    }else{
        Severity: Minor
        Found in app/assets/javascripts/ext/src/widgets/form/Combo.js - About 1 hr to fix

          Function setCellClass has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      var setCellClass = function(cal, cell){
                          cell.title = '';
                          var t = d.clearTime(true).getTime();
                          cell.firstChild.dateValue = t;
                          if(t == today){
          Severity: Minor
          Found in app/assets/javascripts/ext/src/widgets/DatePicker.js - About 1 hr to fix

            Function startSizing has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                startSizing : function(e, handle){
                    this.fireEvent('beforeresize', this, e);
                    if(this.enabled){ // 2nd enabled check in case disabled before beforeresize handler
            
                        if(!this.overlay){
            Severity: Minor
            Found in app/assets/javascripts/ext/src/widgets/Resizable.js - About 1 hr to fix

              Function ensureVisible has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  ensureVisible : function(row, col, hscroll) {
                      var resolved = this.resolveCell(row, col, hscroll);
                      
                      if (!resolved || !resolved.row) {
                          return null;
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/grid/GridView.js - About 1 hr to fix

                Function handleMouseDown has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    handleMouseDown : function(e){
                        var t = this.view.findHeaderCell(e.getTarget());
                        if(t && this.allowHeaderDrag(e)){
                            var xy = this.view.fly(t).getXY(), 
                                x = xy[0],
                Severity: Minor
                Found in app/assets/javascripts/ext/src/widgets/grid/GridView.js - About 1 hr to fix

                  Function extractData has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      extractData: function() {
                          var records  = this.store.data.items,
                              recCount = records.length,
                              cells    = [],
                              record, i, j, k;
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/grid/PivotGrid.js - About 1 hr to fix

                    Function puff has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        puff : function(o){
                            o = getObject(o);
                            var me = this,
                                dom = me.dom,
                                st = dom.style,
                    Severity: Minor
                    Found in app/assets/javascripts/ext/src/ext-core/src/core/Fx.js - About 1 hr to fix

                      Function onClick has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          ,onClick:function(e, target) {
                      
                              var view = this.grid.getView();
                      
                              // handle row action click
                      Severity: Minor
                      Found in app/assets/javascripts/ext_extensions/Ext.ux.grid.RowActions.js - About 1 hr to fix

                        Function collapseRow has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            collapseRow : function(record, skip_process)
                            {
                                var ds = this.ds,
                                    i, len, children, row, index, child_index;
                                        
                        Severity: Minor
                        Found in app/assets/javascripts/ext_extensions/TreeGrid/src/GridView.js - About 1 hr to fix

                          Function renderCellTreeUI has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  renderCellTreeUI : function(record, store)
                                  {
                                      if(store.isFiltered())
                                      {
                                          return this.templates.treeui.apply({});
                          Severity: Minor
                          Found in app/assets/javascripts/ext_extensions/TreeGrid/Overrides.js - About 1 hr to fix

                            Function collapseRow has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                collapseRow : function(record, skip_process)
                                {
                                    var ds = this.ds,
                                        i, len, children, row, index, child_index;
                                            
                            Severity: Minor
                            Found in app/assets/javascripts/ext_extensions/TreeGrid/TreeGrid.js - About 1 hr to fix

                              Function stopEditing has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  stopEditing : function(saveChanges){
                                      this.editing = false;
                                      if(!this.isVisible()){
                                          return;
                                      }
                              Severity: Minor
                              Found in app/assets/javascripts/ext_extensions/RowEditor.js - About 1 hr to fix

                                Function initComponent has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  initComponent: function(){
                                    this.items = [
                                      { xtype: 'container', itemId: 'msgCont', cls: 't_boot', autoHeight: true, region: 'north', items: {
                                          xtype: 'box', itemId: 'msg', html: '<h5>Info:</h5><p>On the left are the apps that you already have access to. On the right are apps that you may add.<br/>Note: for most ' + 
                                                                             'apps, to gain access to additonal features, you will need to request a non-public role via the edit user menu.</p>', 
                                Severity: Minor
                                Found in app/assets/javascripts/dashboard/apps/views/Index.js - About 1 hr to fix

                                  Function obj2url has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  qq.obj2url = function(obj, temp, prefixDone){
                                      var uristrings = [],
                                          prefix = '&',
                                          add = function(nextObj, i){
                                              var nextTemp = temp 
                                  Severity: Minor
                                  Found in app/assets/javascripts/lib/fileuploader.js - About 1 hr to fix

                                    Function constructor has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        constructor: function(config)
                                        {
                                            PhinApplication.superclass.constructor.call(this, config);
                                    
                                            Ext.QuickTips.init();
                                    Severity: Minor
                                    Found in app/assets/javascripts/dashboard/index.js - About 1 hr to fix

                                      Method create_program_and_activation has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        def create_program_and_activation
                                          body = ""
                                          xml = ::Builder::XmlMarkup.new :target => body, :indent => 2
                                          xml.instruct!
                                          xml.ucsxml :version=>"1.1", :xmlns=>"http://ucs.tfcci.com" do |ucsxml|
                                      Severity: Minor
                                      Found in doc/21cc_spike.rb - About 1 hr to fix

                                        Function _fillPermissionsForm has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                            _fillPermissionsForm: function(){
                                                var ap = this.getComponent('tp').getComponent('sh').getComponent('ap');
                                                var audience = null;
                                                if(!ap.rendered){
                                                    audience = this.incoming_audience;
                                        Severity: Minor
                                        Found in app/assets/javascripts/documents/AddEditFolderWindow.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