talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    onShow : function(){
        Ext.ToolTip.superclass.onShow.call(this);
        Ext.getDoc().on('mousedown', this.onDocMouseDown, this);
    },
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/tips/ToolTip.js and 1 other location - About 1 hr to fix
app/assets/javascripts/ext/src/widgets/tips/ToolTip.js on lines 485..488

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 59.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

          yAxis: {
            color: 0x69aBc8,
            majorTicks: {color: 0x69aBc8, length: 4},
            minorTicks: {color: 0x69aBc8, length: 2},
            majorGridLines: {size: 1, color: 0xdfe8f6}
Severity: Major
Found in app/assets/javascripts/ext_extensions/FlashGraph.js and 1 other location - About 1 hr to fix
app/assets/javascripts/ext_extensions/FlashGraph.js on lines 24..29

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 59.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function handler has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                  handler: function(b, e) {
                    Ext.Ajax.request({
                      url: this['approve_url'],
                      scope: b,
                      success: function(response, opts) {
Severity: Minor
Found in app/assets/javascripts/invitations/Invitations.js - About 1 hr to fix

    Function handler has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                      handler: function(b, e) {
                        Ext.Ajax.request({
                          url: this['deny_url'],
                          scope: b,
                          success: function(response, opts) {
    Severity: Minor
    Found in app/assets/javascripts/invitations/Invitations.js - About 1 hr to fix

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

        constructor: function(config){
          Ext.apply(this, config);
      
          // Add flash msg at top and buttons at the bottom
          var panel_items = [
      Severity: Minor
      Found in app/assets/javascripts/invitations/NewInvitationBase.js - About 1 hr to fix

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

          constructor: function(config){
            this.roles_control = new Talho.ux.RolesControl(config.url + ".json", this);
        
            this.infobox = new Ext.Container({
              layout: 'column',
        Severity: Minor
        Found in app/assets/javascripts/profile/ManageRoles.js - About 1 hr to fix

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

            constructor: function(config){
              this.orgs_control = new Talho.ux.OrganizationsControl(config.url + ".json", this);
          
              this.infobox = new Ext.Container({
                layout: 'column',
          Severity: Minor
          Found in app/assets/javascripts/profile/ManageOrganizations.js - About 1 hr to fix

            Function applyTemplate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                applyTemplate : function(values){
                    var me = this,
                        useF = me.disableFormats !== true,
                        fm = Ext.util.Format,
                        tpl = me;
            Severity: Minor
            Found in app/assets/javascripts/ext/src/core/Template-more.js - About 1 hr to fix

              Function scrollIntoView has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  scrollIntoView : function(container, hscroll) {
                      var c = Ext.getDom(container) || Ext.getBody().dom,
                          el = this.dom,
                          o = this.getOffsetsTo(c),
                          l = o[0] + c.scrollLeft,
              Severity: Minor
              Found in app/assets/javascripts/ext/src/core/Element.scroll-more.js - About 1 hr to fix

                Function sort has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    sort : function(fieldName, dir) {
                        if (this.remoteSort) {
                            return Ext.data.GroupingStore.superclass.sort.call(this, fieldName, dir);
                        }
                
                
                Severity: Minor
                Found in app/assets/javascripts/ext/src/data/GroupingStore.js - About 1 hr to fix

                  Function onNodeOver has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      onNodeOver : function(n, dd, e, data){
                          var pt = this.getDropPoint(e, n, dd);
                          var node = n.node;
                          
                          // auto node expand check
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/tree/TreeDropZone.js - About 1 hr to fix

                    Function initEvents has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        initEvents : function(){
                            Ext.form.TextField.superclass.initEvents.call(this);
                            if(this.validationEvent == 'keyup'){
                                this.validationTask = new Ext.util.DelayedTask(this.validate, this);
                                this.mon(this.el, 'keyup', this.filterValidation, this);
                    Severity: Minor
                    Found in app/assets/javascripts/ext/src/widgets/form/TextField.js - About 1 hr to fix

                      Function onMonthClick has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          onMonthClick : function(e, t){
                              e.stopEvent();
                              var el = new Ext.Element(t), pn;
                              if(el.is('button.x-date-mp-cancel')){
                                  this.hideMonthPicker();
                      Severity: Minor
                      Found in app/assets/javascripts/ext/src/widgets/DatePicker.js - About 1 hr to fix

                        Function setContainer has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            setContainer : function(ct){
                                Ext.layout.FormLayout.superclass.setContainer.call(this, ct);
                                if(ct.labelAlign){
                                    ct.addClass('x-form-label-'+ct.labelAlign);
                                }
                        Severity: Minor
                        Found in app/assets/javascripts/ext/src/widgets/layout/FormLayout.js - About 1 hr to fix

                          Function getTemplate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  getTemplate : function() {
                                      return [
                                          '<div id="ux-lightbox">',
                                              '<div id="ux-lightbox-outerImageContainer">',
                                                  '<div id="ux-lightbox-imageContainer">',

                            Function initMarkup has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                initMarkup: function() {
                                    var dh = Ext.DomHelper;
                                    
                                    this.carouselSize = 0;
                                    var items = this.el.select(this.itemSelector);

                              Function createResponseObject has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function createResponseObject(o, callbackArg) {
                                      var headerObj = {},
                                          headerStr,
                                          conn = o.conn,
                                          t,

                                Function setEvent has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        setEvent : function(e){
                                            var me = this;
                                            if(e == me || (e && e.browserEvent)){ // already wrapped
                                                return e;
                                            }
                                Severity: Minor
                                Found in app/assets/javascripts/ext/src/ext-core/src/core/EventManager.js - About 1 hr to fix

                                  Function setRunAttr has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          setRunAttr: function(attr) {
                                              var me = this,
                                                  a = this.attributes[attr],
                                                  to = a.to,
                                                  by = a.by,

                                    Function garbageCollect has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function garbageCollect(){
                                        if(!Ext.enableGarbageCollector){
                                            clearInterval(El.collectorThreadId);
                                        } else {
                                            var eid,
                                    Severity: Minor
                                    Found in app/assets/javascripts/ext/src/ext-core/src/core/Element.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language