openfoodfoundation/openfoodnetwork

View on GitHub

Showing 6,082 of 6,082 total issues

Module has too many lines. [428/100]
Open

  module Subscriptions
    describe Validator do
      let(:owner) { create(:user) }
      let(:shop) { create(:enterprise, name: "Shop", owner: owner) }

This cop checks if the length a module exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Module has too many lines. [399/100]
Open

  module Subscriptions
    describe ProxyOrderSyncer do
      describe "initialization" do
        let!(:subscription) { create(:subscription) }

This cop checks if the length a module exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [390/100]
Open

  class EntryValidator
    SKIP_VALIDATE_ON_UPDATE = [:description].freeze

    # rubocop:disable Metrics/ParameterLists
    def initialize(current_user, import_time, spreadsheet_data, editable_enterprises,

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [379/100]
Open

class Enterprise < ActiveRecord::Base
  SELLS = %w(unspecified none own any).freeze
  ENTERPRISE_SEARCH_RADIUS = 100

  preference :shopfront_message, :text, default: ""
Severity: Minor
Found in app/models/enterprise.rb by rubocop

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [319/100]
Open

      class Scope
        attr_accessor :parameters

        def initialize
          setup_default_scope

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [261/100]
Open

  class EnterprisesController < ResourceController
    # These need to run before #load_resource so that @object is initialised with sanitised values
    prepend_before_action :override_owner, only: :create
    prepend_before_action :override_sells, only: :create

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Method has too many lines. [140/10]
Open

      def self.included(klass)
        klass.class_eval do
          class_attribute :next_event_transitions
          class_attribute :previous_states
          class_attribute :checkout_flow
Severity: Minor
Found in app/models/spree/order/checkout.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [243/100]
Open

  class Shipment < ActiveRecord::Base
    belongs_to :order, class_name: 'Spree::Order'
    belongs_to :address, class_name: 'Spree::Address'
    belongs_to :stock_location, class_name: 'Spree::StockLocation'

Severity: Minor
Found in app/models/spree/shipment.rb by rubocop

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [231/100]
Open

      class BulkCoopReport
        REPORT_TYPES = [
          :bulk_coop_supplier_report,
          :bulk_coop_allocation,
          :bulk_coop_packing_sheets,

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [228/100]
Open

class AbilityDecorator
  include CanCan::Ability

  # All abilites are allocated from this initialiser.
  # Spree also defines other abilities.

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [221/100]
Open

  class ProductImporter
    extend ActiveModel::Naming
    include ActiveModel::Conversion
    include ActiveModel::Validations

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [221/100]
Open

  class OrderCyclePermissions < Permissions
    def initialize(user, order_cycle)
      super(user)
      @order_cycle = order_cycle
      @coordinator = order_cycle.andand.coordinator

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [218/100]
Open

    class ReportsController < Spree::Admin::BaseController
      include Spree::ReportsHelper

      ORDER_MANAGEMENT_ENGINE_REPORTS = [
        :bulk_coop,

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [218/100]
Open

    class ResourceController < Spree::Admin::BaseController
      helper_method :new_object_url, :edit_object_url, :object_url, :collection_url
      before_action :load_resource, except: [:update_positions]
      rescue_from ActiveRecord::RecordNotFound, with: :resource_not_found
      rescue_from CanCan::AccessDenied, with: :unauthorized

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [209/100]
Open

    class StripePaymentIntentsGateway < StripeGateway
      ALLOWED_METHOD_STATES = %w[automatic manual].freeze
      ALLOWED_CANCELLATION_REASONS = %w[duplicate fraudulent requested_by_customer abandoned].freeze
      CREATE_INTENT_ATTRIBUTES =
        %i[description statement_descriptor receipt_email save_payment_method].freeze

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Module has too many lines. [208/100]
Open

    module Processing
      def process!
        return unless payment_method&.source_required?

        raise Core::GatewayError, Spree.t(:payment_processing_failed) unless source

This cop checks if the length a module exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [203/100]
Open

class OrderCycle < ActiveRecord::Base
  belongs_to :coordinator, class_name: 'Enterprise'

  has_many :coordinator_fee_refs, class_name: 'CoordinatorFee'
  has_many :coordinator_fees, through: :coordinator_fee_refs, source: :enterprise_fee
Severity: Minor
Found in app/models/order_cycle.rb by rubocop

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [201/100]
Open

    class ProductsController < ResourceController
      helper 'spree/products'
      include OpenFoodNetwork::SpreeApiKeyLoader
      include OrderCyclesHelper
      include EnterprisesHelper

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [200/100]
Open

  class OrderCyclesController < ResourceController
    include OrderCyclesHelper

    prepend_before_action :set_order_cycle_id, only: [:incoming, :outgoing]
    before_action :load_data_for_index, only: :index

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Class has too many lines. [186/100]
Open

class CheckoutController < Spree::StoreController
  layout 'darkswarm'

  include CheckoutHelper
  include OrderCyclesHelper

This cop checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Severity
Category
Status
Source
Language