ging/social_stream

View on GitHub

Showing 172 of 172 total issues

Function WINDOW has 422 lines of code (exceeds 25 allowed). Consider refactoring.
Open

PRESENCE.WINDOW = (function(P,$,undefined){

  var init = function(){ }
    
    ////////////////////
Severity: Major
Found in presence/app/assets/javascripts/presence_windowManager.js - About 2 days to fix

    Function WINDOW has a Cognitive Complexity of 104 (exceeds 5 allowed). Consider refactoring.
    Open

    PRESENCE.WINDOW = (function(P,$,undefined){
    
      var init = function(){ }
        
        ////////////////////
    Severity: Minor
    Found in presence/app/assets/javascripts/presence_windowManager.js - About 2 days 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 PERSISTENCE has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring.
    Open

    PRESENCE.PERSISTENCE = (function(P,$,undefined){
    
      var init = function(){ }
    
    
    
    Severity: Minor
    Found in presence/app/assets/javascripts/presence_persistence.js - About 1 day 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 Contact has 256 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    SocialStream.Contact = (function($, SS, undefined) {
      var callback = new SS.Callback();
    
      var getForms = function(id) {
        return $('[data-contact_id="' + id + '"]');
    Severity: Major
    Found in base/app/assets/javascripts/social_stream/contact.js - About 1 day to fix

      Method change has 235 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def change
          create_table "activities", :force => true do |t|
            t.integer    "activity_verb_id"
            t.datetime   "created_at"
            t.datetime   "updated_at"
      Severity: Major
      Found in base/db/migrate/20120326083509_create_social_stream.rb - About 1 day to fix

        Function PARSER has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
        Open

        PRESENCE.PARSER = (function(P,$,undefined){
        
            ////////////////////
            //Hash table
            ////////////////////
        Severity: Minor
        Found in presence/app/assets/javascripts/presence_parser.js - About 1 day 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 PARSER has 198 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        PRESENCE.PARSER = (function(P,$,undefined){
        
            ////////////////////
            //Hash table
            ////////////////////
        Severity: Major
        Found in presence/app/assets/javascripts/presence_parser.js - About 7 hrs to fix

          Function _create has 180 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _create: function(){
                  var self = this,
                  options = self.options,
                  title = options.title || "No Title",
                  // chatbox
          Severity: Major
          Found in presence/app/assets/javascripts/jquery.ui.chatbox.sstreampresence.js - About 7 hrs to fix

            Function UTILITIES has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
            Open

            PRESENCE.UTILITIES = (function(P,$,undefined){
            
              var init = function(){ 
                  initFocusListeners();
                }
            Severity: Minor
            Found in presence/app/assets/javascripts/presence_utilities.js - About 7 hrs 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 NOTIFICATIONS has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
            Open

            PRESENCE.NOTIFICATIONS = (function(P,$,undefined){
            
              var init = function(){ }
            
            
            
            Severity: Minor
            Found in presence/app/assets/javascripts/presence_notifications.js - About 6 hrs 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

            Class Actor has 48 methods (exceeds 20 allowed). Consider refactoring.
            Open

            class Actor < ActiveRecord::Base
              # Actor is a supertype of all subjects defined in SocialStream.subjects
              supertype_of :subject
            
              include SocialStream::Models::Object
            Severity: Minor
            Found in base/app/models/actor.rb - About 6 hrs to fix

              Function NOTIFICATIONS has 165 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              PRESENCE.NOTIFICATIONS = (function(P,$,undefined){
              
                var init = function(){ }
              
              
              
              Severity: Major
              Found in presence/app/assets/javascripts/presence_notifications.js - About 6 hrs to fix

                Function PERSISTENCE has 163 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                PRESENCE.PERSISTENCE = (function(P,$,undefined){
                
                  var init = function(){ }
                
                
                
                Severity: Major
                Found in presence/app/assets/javascripts/presence_persistence.js - About 6 hrs to fix

                  File xmpp_server_order.rb has 436 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  require 'net/ssh'
                  require 'net/sftp'
                  
                  
                  module SocialStream
                  Severity: Minor
                  Found in presence/lib/social_stream/presence/xmpp_server_order.rb - About 6 hrs to fix

                    File presence_windowManager.js has 424 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    ////////////////////
                    //WINDOW MANAGER MODULE
                    ////////////////////
                    
                    PRESENCE.WINDOW = (function(P,$,undefined){
                    Severity: Minor
                    Found in presence/app/assets/javascripts/presence_windowManager.js - About 6 hrs to fix

                      Method update_all has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
                      Open

                        def update_all
                          success = false
                      
                          #If no section selected, skips and gives error
                          if params[:settings_section].present?
                      Severity: Minor
                      Found in base/app/controllers/settings_controller.rb - About 6 hrs 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 UTILITIES has 152 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      PRESENCE.UTILITIES = (function(P,$,undefined){
                      
                        var init = function(){ 
                            initFocusListeners();
                          }
                      Severity: Major
                      Found in presence/app/assets/javascripts/presence_utilities.js - About 6 hrs to fix

                        Class XmppServerOrder has 39 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                            class XmppServerOrder
                              
                              class << self
                                  
                                  ##################
                        Severity: Minor
                        Found in presence/lib/social_stream/presence/xmpp_server_order.rb - About 5 hrs to fix

                          Function RelationCustom has 127 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          SocialStream.RelationCustom = (function(SS, $, undefined){
                            var callback = new SS.Callback();
                          
                            var getListEl = function() {
                              return $('.relation_list');
                          Severity: Major
                          Found in base/app/assets/javascripts/social_stream/relation_customs.js - About 5 hrs to fix

                            Function Comment has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            SocialStream.Comment = (function(SS, $, undefined){
                              var callback = new SS.Callback();
                            
                              var elAlwaysHidden = [
                                "input[type=submit]"
                            Severity: Major
                            Found in base/app/assets/javascripts/social_stream/comment.js - About 4 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language