sharetribe/sharetribe

View on GitHub

Showing 700 of 1,230 total issues

File sortable.js has 2871 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**!
 * Sortable 1.10.2
 * @author    RubaXa   <trash@rubaxa.org>
 * @author    owenm    <owen23355@gmail.com>
 * @license MIT
Severity: Major
Found in app/assets/javascripts/admin2/sortable.js - About 1 wk to fix

    File spectrum.js has 1808 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // Spectrum Colorpicker v1.8.0
    // https://github.com/bgrins/spectrum
    // Author: Brian Grinstead
    // License: MIT
    
    
    Severity: Major
    Found in app/assets/javascripts/admin2/spectrum.js - About 4 days to fix

      Function spectrum has 625 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function spectrum(element, o) {
      
              var opts = instanceOptions(o, element),
                  flat = opts.flat,
                  showSelectionPalette = opts.showSelectionPalette,
      Severity: Major
      Found in app/assets/javascripts/admin2/spectrum.js - About 3 days to fix

        Function MultiDragPlugin has 463 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function MultiDragPlugin() {
            function MultiDrag(sortable) {
              // Bind all private methods
              for (var fn in this) {
                if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
        Severity: Major
        Found in app/assets/javascripts/admin2/sortable.js - About 2 days to fix

          File kassi.js has 757 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          // Custom Javascript functions for Sharetribe
          // Add custom validation methods
          
          function add_validator_methods() {
          
          
          Severity: Major
          Found in app/assets/javascripts/kassi.js - About 1 day to fix

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

            module ApplicationHelper
            
              # Removes whitespaces from HAML expressions
              # if you add two elements on two lines; the white space creates a space between the elements (in some browsers)
              def one_line_for_html_safe_content(&block)
            Severity: Major
            Found in app/helpers/application_helper.rb - About 1 day to fix

              Function imageUploader has 295 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              window.ST.imageUploader = function(listings, opts) {
                var elementManager = ST.imageUploadElementManager($("#image-uploader-container"));
                var directUploadToS3 = !!opts.s3Fields && !!opts.s3UploadPath;
              
                var extraPlaceholders = 2;
              Severity: Major
              Found in app/assets/javascripts/image_uploader.js - About 1 day to fix

                File example_data.rb has 574 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                module CustomLandingPage
                  # rubocop:disable Metrics/ModuleLength
                  module ExampleData
                
                    # TODO Document the expected JSON structure here
                Severity: Major
                Found in app/services/custom_landing_page/example_data.rb - About 1 day to fix

                  Method admin_links_for has 234 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    def admin_links_for(community)
                      links = [
                        {
                          :topic => :general,
                          :text => t("admin.communities.getting_started.getting_started"),
                  Severity: Major
                  Found in app/helpers/application_helper.rb - About 1 day to fix

                    Class PaymentSettingsPresenter has 63 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                    class Person::PaymentSettingsPresenter
                      include Person::PaymentSettingsCommon
                    
                      private
                    
                    
                    Severity: Major
                    Found in app/presenters/person/payment_settings_presenter.rb - About 1 day to fix

                      File googlemaps.js has 547 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      var directionsDisplay;
                      var directionsService;
                      var marker;
                      var geocoder;
                      var map;
                      Severity: Major
                      Found in app/assets/javascripts/googlemaps.js - About 1 day to fix

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

                        class Person < ApplicationRecord
                        
                          include ErrorsHelper
                          include ApplicationHelper
                          include DeletePerson
                        Severity: Major
                        Found in app/models/person.rb - About 1 day to fix

                          Method build_default_test_actions has 203 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              def build_default_test_actions
                                identity = -> (val, _) { val }
                          
                                {
                                  get_express_checkout_details: PaypalAction.def_action(
                          Severity: Major
                          Found in lib/services/paypal_service/test_merchant.rb - About 1 day to fix

                            Function _onDragOver has 201 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                _onDragOver: function _onDragOver(
                                /**Event*/
                                evt) {
                                  var el = this.el,
                                      target = evt.target,
                            Severity: Major
                            Found in app/assets/javascripts/admin2/sortable.js - About 1 day to fix

                              Function initializeManageMembers has 198 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              window.ST.initializeManageMembers = function() {
                                var DELAY = 800;
                              
                                function createCheckboxAjaxRequest(streams, url, allowedKey, disallowedKey) {
                                  var ajaxRequest = Bacon.combineAsArray(streams).changes().debounce(DELAY).skipDuplicates(_.isEqual).map(function(valueObjects) {
                              Severity: Major
                              Found in app/assets/javascripts/admin/manage_members.js - About 7 hrs to fix

                                Class Community has 55 methods (exceeds 20 allowed). Consider refactoring.
                                Open

                                class Community < ApplicationRecord # rubocop:disable Metrics/ClassLength
                                
                                  require 'compass'
                                  require 'sass/plugin'
                                
                                
                                Severity: Major
                                Found in app/models/community.rb - About 7 hrs to fix

                                  Class ListingPresenter has 53 methods (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class ListingPresenter < MemoisticPresenter
                                    include ListingAvailabilityManage
                                    include Rails.application.routes.url_helpers
                                    attr_accessor :listing, :current_community, :form_path, :params, :current_image, :prev_image_id, :next_image_id
                                    attr_reader :shape, :current_user
                                  Severity: Major
                                  Found in app/presenters/listing_presenter.rb - About 7 hrs to fix

                                    File person_mailer.rb has 478 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    include ApplicationHelper
                                    include ListingsHelper
                                    include TruncateHtmlHelper
                                    # rubocop:enable Style/MixinUsage
                                    
                                    
                                    Severity: Minor
                                    Found in app/mailers/person_mailer.rb - About 7 hrs to fix

                                      Class ApplicationController has 52 methods (exceeds 20 allowed). Consider refactoring.
                                      Open

                                      class ApplicationController < ActionController::Base
                                      
                                        module DefaultURLOptions
                                          # Adds locale to all links
                                          def default_url_options
                                      Severity: Major
                                      Found in app/controllers/application_controller.rb - About 7 hrs to fix

                                        File ipn.rb has 468 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        module PaypalService
                                        
                                          Invnum = PaypalService::API::Invnum
                                        
                                          module DataTypes
                                        Severity: Minor
                                        Found in app/services/paypal_service/data_types/ipn.rb - About 7 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language