talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

Function offset has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

jQuery.fn.offset = function() {
    var left = 0, top = 0, elem = this[0], results;
    
    if ( elem ) with ( jQuery.browser ) {
        var parent       = elem.parentNode, 
Severity: Minor
Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js - About 1 hr to fix

    Function execute has 48 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        execute: function (action, rs, options, batch) {
            if (!Ext.data.Api.isAction(action)) {
                throw new Ext.data.Api.Error('execute', action);
            }
            options = Ext.applyIf(options || {}, {
    Severity: Minor
    Found in app/assets/javascripts/ext_extensions/PagingStore.js - About 1 hr to fix

      Function open_tab has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          open_tab: function(config) {
              if(this.tabPanel.getComponent(config.id) === undefined) {
                  var panel;
      
                  if(Talho.ScriptManager.exists(config.initializer))
      Severity: Minor
      Found in app/assets/javascripts/dashboard/index.js - About 1 hr to fix

        Method update has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def update   
            if (current_user.is_admin? || current_user.moderator_of?(@forum) || current_user.forum_owner_of?(@forum))
              @forum = Forum.for_user(current_user).find(params[:id], :readonly => false)
              merge_if(params[:forum][:audience_attributes],{:owner_id=>current_user.id})      
          
        Severity: Minor
        Found in app/controllers/forums_controller.rb - About 1 hr to fix

          Method get_version has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def get_version(id)
              if allowed_to_see(id)
                req_ver = Version.find(id)
                req_rec = reify_and_get_attrs(req_ver)
                req_rec = req_ver.item_type.constantize.new.attributes if req_rec.nil?
          Severity: Minor
          Found in app/controllers/audits_controller.rb - About 1 hr to fix

            Function _createFileIconView has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                _createFileIconView: function(store){
            
                    return {
                        xtype: 'panel',
                        title: 'Files',
            Severity: Minor
            Found in app/assets/javascripts/documents/Documents.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 constructor has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

              constructor: function(config){
            
                this.recipesStore = new Ext.data.JsonStore({
                  url: '/admin/invitations/recipe_types.json',
                  restful: true,
            Severity: Minor
            Found in app/assets/javascripts/invitations/Invitations.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 renderElements has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                renderElements : function(n, a, targetNode, bulkRender){
                    this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : '';
            
                    var t = n.getOwnerTree();
                    var cols = t.columns;
            Severity: Minor
            Found in app/assets/javascripts/ext/src/debug.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 update has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                update : function(rs, data) {
                    if (Ext.isArray(rs)) {
                        for (var i=rs.length-1; i >= 0; i--) {
                            if (Ext.isArray(data)) {
                                this.update(rs.splice(i,1).shift(), data.splice(i,1).shift());
            Severity: Minor
            Found in app/assets/javascripts/ext/src/data/DataReader.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 realize has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                realize: function(rs, data){
                    if (Ext.isArray(rs)) {
                        for (var i = rs.length - 1; i >= 0; i--) {
                            // recurse
                            if (Ext.isArray(data)) {
            Severity: Minor
            Found in app/assets/javascripts/ext/src/data/DataReader.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 onKeyDown has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                onKeyDown : function(e){
                    var s = this.selNode || this.lastSelNode;
                    // undesirable, but required
                    var sm = this;
                    if(!s){
            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 collapse has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                collapse : function(deep, anim, callback, scope){
                    if(this.expanded && !this.isHiddenRoot()){
                        if(this.fireEvent('beforecollapse', this, deep, anim) === false){
                            return;
                        }
            Severity: Minor
            Found in app/assets/javascripts/ext/src/widgets/tree/TreeNode.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 doQuery has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                doQuery : function(q, forceAll){
                    q = Ext.isEmpty(q) ? '' : q;
                    var qe = {
                        query: q,
                        forceAll: forceAll,
            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 onSetValue has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                onSetValue: function(id, value){
                    if(arguments.length == 1){
                        if(Ext.isArray(id)){
                            Ext.each(id, function(val, idx){
                                if (Ext.isObject(val) && val.setValue){ // array of checkbox components to be checked
            Severity: Minor
            Found in app/assets/javascripts/ext/src/widgets/form/CheckboxGroup.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 onLayout has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                onLayout : function(ct, target){
                    var cs = ct.items.items,
                        len = cs.length,
                        c,
                        i,
            Severity: Minor
            Found in app/assets/javascripts/ext/src/widgets/layout/ColumnLayout.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 onLayout has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                onLayout : function(ct, target) {
                    //render the Toolbar <table> HTML if it's not already present
                    if (!this.leftTr) {
                        var align = ct.buttonAlign == 'center' ? 'center' : 'left';
            
            
            Severity: Minor
            Found in app/assets/javascripts/ext/src/widgets/layout/ToolbarLayout.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 showAt has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                showAt : function(xy){
                    var t = this.activeTarget;
                    if(t){
                        if(!this.rendered){
                            this.render(Ext.getBody());
            Severity: Minor
            Found in app/assets/javascripts/ext/src/widgets/tips/QuickTip.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 doRender has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                doRender : function(cs, rs, ds, startRow, colCount, stripe){
                    if(rs.length < 1){
                        return '';
                    }
            
            
            Severity: Minor
            Found in app/assets/javascripts/ext/src/widgets/grid/GroupingView.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 setActiveNode has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                setActiveNode : function(rc)
                {
                    if (this.active_node !== rc) {
                        if (rc) {
                            if (this.data.indexOf(rc) != -1) {
            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 verifyLayout has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
            Open

                verifyLayout: function(force){
                    if(this.el && (this.isVisible() || force === true)){
                        var row = this.grid.getView().getRow(this.rowIndex);
                        this.setSize(Ext.fly(row).getWidth(), Ext.isIE ? Ext.fly(row).getHeight() + 9 : undefined);
                        var cm = this.grid.colModel, fields = this.items.items;
            Severity: Minor
            Found in app/assets/javascripts/ext_extensions/RowEditor.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