Noosfero/noosfero

View on GitHub

Showing 1,031 of 1,643 total issues

File moment-with-locales.js has 8154 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
    typeof define === 'function' && define.amd ? define(factory) :
    global.moment = factory()
}(this, function () { 'use strict';
Severity: Major
Found in plugins/orders/public/javascripts/moment-with-locales.js - About 3 wks to fix

    File jquery-1.8.3.js has 6532 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * jQuery JavaScript Library v1.8.3
     * http://jquery.com/
     *
     * Includes Sizzle.js

      File jquery.jstree.js has 4203 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*
       * jsTree 1.0-rc3
       * http://jstree.com/
       *
       * Copyright (c) 2010 Ivan Bozhanov (vakata.com)

        Function SyntaxHighlighter has a Cognitive Complexity of 380 (exceeds 5 allowed). Consider refactoring.
        Open

        if (!window.SyntaxHighlighter) var SyntaxHighlighter = function() { 
        
        // Shortcut object which will be assigned to the SyntaxHighlighter variable.
        // This is a shorthand for local reference in order to avoid long namespace 
        // references to SyntaxHighlighter.whatever...

        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 SyntaxHighlighter has 1012 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        if (!window.SyntaxHighlighter) var SyntaxHighlighter = function() { 
        
        // Shortcut object which will be assigned to the SyntaxHighlighter variable.
        // This is a shorthand for local reference in order to avoid long namespace 
        // references to SyntaxHighlighter.whatever...

          File !script.js has 1320 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * SyntaxHighlighter
           * http://alexgorbatchev.com/
           *
           * SyntaxHighlighter is donationware. If you are using it, please donate.

            Class Profile has 169 methods (exceeds 20 allowed). Consider refactoring.
            Open

            class Profile < ApplicationRecord
              attr_accessible :name, :identifier, :access, :nickname,
                              :custom_footer, :custom_header, :address, :zip_code, :contact_phone,
                              :image_builder, :top_image_builder, :description, :closed, :template_id, :environment, :lat,
                              :lng, :is_template, :fields_privacy, :preferred_domain_id, :category_ids,
            Severity: Major
            Found in app/models/profile.rb - About 3 days to fix

              File application_helper.rb has 1058 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              module ApplicationHelper
                include PermissionNameHelper
              
                include UrlHelper
              
              
              Severity: Major
              Found in app/helpers/application_helper.rb - About 2 days to fix

                File profile.rb has 1042 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                class Profile < ApplicationRecord
                  attr_accessible :name, :identifier, :access, :nickname,
                                  :custom_footer, :custom_header, :address, :zip_code, :contact_phone,
                                  :image_builder, :top_image_builder, :description, :closed, :template_id, :environment, :lat,
                                  :lng, :is_template, :fields_privacy, :preferred_domain_id, :category_ids,
                Severity: Major
                Found in app/models/profile.rb - About 2 days to fix

                  File application.js has 1025 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  // Place your application-specific JavaScript functions and classes here
                  // This file is automatically included by javascript_include_tag :defaults
                  /*
                  * third party libraries
                  *= require vendor/lodash.js
                  Severity: Major
                  Found in public/javascripts/application.js - About 2 days to fix

                    File daterangepicker.js has 1010 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /**
                    * @version: 1.3.21
                    * @author: Dan Grossman http://www.dangrossman.info/
                    * @copyright: Copyright (c) 2012-2015 Dan Grossman. All rights reserved.
                    * @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
                    Severity: Major
                    Found in plugins/orders/public/javascripts/daterangepicker.js - About 2 days to fix

                      Class Environment has 122 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                      class Environment < ApplicationRecord
                        attr_accessible :name, :is_default, :signup_welcome_text_subject,
                                        :signup_welcome_text_body, :terms_of_use,
                                        :message_for_disabled_enterprise, :news_amount_by_folder,
                                        :default_language, :languages, :description,
                      Severity: Major
                      Found in app/models/environment.rb - About 2 days to fix

                        Class Article has 120 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                        class Article < ApplicationRecord
                          module Editor
                            TEXTILE = "textile"
                            TINY_MCE = "tiny_mce"
                            RAW_HTML = "raw_html"
                        Severity: Major
                        Found in app/models/article.rb - About 2 days to fix

                          File environment.rb has 885 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          class Environment < ApplicationRecord
                            attr_accessible :name, :is_default, :signup_welcome_text_subject,
                                            :signup_welcome_text_body, :terms_of_use,
                                            :message_for_disabled_enterprise, :news_amount_by_folder,
                                            :default_language, :languages, :description,
                          Severity: Major
                          Found in app/models/environment.rb - About 2 days to fix

                            File chat.js has 856 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            /* XMPP/Jabber Noosfero's client
                            
                            XMPP Core:
                            http://xmpp.org/rfcs/rfc3920.html
                            
                            
                            Severity: Major
                            Found in public/javascripts/chat.js - About 2 days to fix

                              Class Plugin has 98 methods (exceeds 20 allowed). Consider refactoring.
                              Open

                              class Noosfero::Plugin
                                attr_accessor :context
                              
                                def initialize(context = nil)
                                  self.context = context
                              Severity: Major
                              Found in lib/noosfero/plugin.rb - About 1 day to fix

                                File article.rb has 709 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                class Article < ApplicationRecord
                                  module Editor
                                    TEXTILE = "textile"
                                    TINY_MCE = "tiny_mce"
                                    RAW_HTML = "raw_html"
                                Severity: Major
                                Found in app/models/article.rb - About 1 day to fix

                                  Class Person has 85 methods (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class Person < Profile
                                    attr_accessible :organization, :contact_information, :sex, :birth_date, :cell_phone,
                                                    :comercial_phone, :jabber_id, :personal_website, :nationality, :schooling,
                                                    :schooling_status, :formation, :custom_formation, :area_of_study,
                                                    :custom_area_of_study, :professional_activity, :organization_website,
                                  Severity: Major
                                  Found in app/models/person.rb - About 1 day to fix

                                    File bootstrap-tokenfield.js has 701 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    /*!
                                     * bootstrap-tokenfield
                                     * https://github.com/sliptree/bootstrap-tokenfield
                                     * Copyright 2013-2014 Sliptree and other contributors; Licensed MIT
                                     */
                                    Severity: Major
                                    Found in plugins/fb_app/public/javascripts/bootstrap-tokenfield.js - About 1 day to fix

                                      Function socialSharePrivacy has 303 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          function socialSharePrivacy (options) {
                                      
                                              if (typeof options === "string") {
                                                  var command = options;
                                                  if (arguments.length === 1) {
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language