talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

Function onKeyDown has 34 lines of code (exceeds 25 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

    Function expandPath has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        expandPath : function(path, attr, callback){
            if(Ext.isEmpty(path)){
                if(callback){
                    callback(false, undefined);
                }
    Severity: Minor
    Found in app/assets/javascripts/ext/src/widgets/tree/TreePanel.js - About 1 hr to fix

      Function selectPath has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          selectPath : function(path, attr, callback){
              if(Ext.isEmpty(path)){
                  if(callback){
                      callback(false, undefined);
                  }
      Severity: Minor
      Found in app/assets/javascripts/ext/src/widgets/tree/TreePanel.js - About 1 hr to fix

        Function initEditor has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            initEditor : function(){
                //Destroying the component during/before initEditor can cause issues.
                try{
                    var dbody = this.getEditorBody(),
                        ss = this.el.getStyles('font-size', 'font-family', 'background-image', 'background-repeat', 'background-color', 'color'),
        Severity: Minor
        Found in app/assets/javascripts/ext/src/widgets/form/HtmlEditor.js - About 1 hr to fix

          Function getErrors has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              getErrors: function(value) {
                  var errors = Ext.form.TextField.superclass.getErrors.apply(this, arguments);
                  
                  value = Ext.isDefined(value) ? value : this.processValue(this.getRawValue());        
                  
          Severity: Minor
          Found in app/assets/javascripts/ext/src/widgets/form/TextField.js - About 1 hr to fix

            Function Layer has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            Ext.Layer = function(config, existingEl){
                config = config || {};
                var dh = Ext.DomHelper,
                    cp = config.parentEl, pel = cp ? Ext.getDom(cp) : document.body;
                    
            Severity: Minor
            Found in app/assets/javascripts/ext/src/widgets/Layer.js - About 1 hr to fix

              Function onLayout has 34 lines of code (exceeds 25 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

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

                        open: function(image, sel, group) {
                            group = group || false;
                            this.setViewSize();
                            els.overlay.fadeIn({
                                duration: this.overlayDuration,

                  Function SplitBar has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  Ext.SplitBar = function(dragElement, resizingElement, orientation, placement, existingProxy){
                  
                      /** @private */
                      this.el = Ext.get(dragElement, true);
                      this.el.dom.unselectable = "on";
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/SplitBar.js - About 1 hr to fix

                    Function step has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        step: function(gotoEnd){
                            var t = (new Date()).getTime();
                    
                            if ( gotoEnd || t > this.options.duration + this.startTime ) {
                                this.now = this.end;
                    Severity: Minor
                    Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js - About 1 hr to fix

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

                        showEditWindow: function(){
                          var htmleditor = new Talho.ux.PhinHtmlEditor({
                            linksInNewWindow: true,
                            name: 'htmlportlet',
                            region: 'center',
                      Severity: Minor
                      Found in app/assets/javascripts/dashboard/cms/portlets/phin.js - About 1 hr to fix

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

                          initComponent: function() {
                            this.rss_store = new Ext.data.JsonStore({
                              url: '/rss_feed.json',
                              baseParams: {
                                'urls[]': this.urls,
                        Severity: Minor
                        Found in app/assets/javascripts/dashboard/cms/portlets/rss.js - About 1 hr to fix

                          Function load has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              load: function( url, params, callback ) {
                                  if ( jQuery.isFunction( url ) )
                                      return this.bind("load", url);
                          
                                  var off = url.indexOf(" ");
                          Severity: Minor
                          Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js - About 1 hr to fix

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

                              showEditWindow: function(){
                                var htmleditor = new Ext.form.HtmlEditor({
                                  linksInNewWindow: true,
                                  name: 'htmlportlet',
                                  region: 'center',
                            Severity: Minor
                            Found in app/assets/javascripts/dashboard/cms/portlets/html.js - About 1 hr to fix

                              Function parseStringItem has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function parseStringItem( string , context , thread ) {
                              
                                  var done,
                                      func,
                                      data = {},
                              Severity: Minor
                              Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 1 hr to fix

                                Method handle_org_requests has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  def handle_org_requests(req_json, current_user)
                                    return [ false, [ "Permission denied" ] ] unless editable_by?(current_user)
                                    rq_list = ActiveSupport::JSON.decode(req_json)
                                    result = "success"
                                    rq_errors = []
                                Severity: Minor
                                Found in app/models/user.rb - About 1 hr to fix

                                  Function getStore has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      getStore: function(){
                                          if(!this.store){
                                              var writer = new Ext.data.JsonWriter({
                                                  encode: false,
                                                  createRecord: function(record){
                                  Severity: Minor
                                  Found in app/assets/javascripts/dashboard/favorites.js - About 1 hr to fix

                                    Method import has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      def import
                                        invitees = []
                                        csvfile = params[:invitation][:csvfile]
                                        newfile = File.join(Rails.root.to_s,'tmp',csvfile.original_filename)
                                        File.open(newfile,'wb') do |file|
                                    Severity: Minor
                                    Found in app/controllers/admin/invitations_controller.rb - About 1 hr to fix

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

                                        def update
                                          if (params[:topic] && params[:topic][:comment_attributes] && params[:topic][:comment_attributes][:comment_id])    
                                            parent_topic = Topic.find(params[:topic][:comment_attributes][:comment_id])
                                            while not parent_topic.comment_id.nil?
                                              parent_topic = Topic.find(parent_topic.comment_id)
                                      Severity: Minor
                                      Found in app/controllers/topics_controller.rb - About 1 hr to fix

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

                                                    b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight};
                                        Severity: Major
                                        Found in app/assets/javascripts/ext/src/ext-core/src/core/Fx.js and 1 other location - About 1 hr to fix
                                        app/assets/javascripts/ext/src/ext-core/src/core/Fx.js on lines 304..304

                                        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 62.

                                        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

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language