Showing 591 of 591 total issues

Block has too many lines. [81/25]
Open

ActiveAdmin.register Proposal do
  actions :index, :show

  permit_params :status

Severity: Minor
Found in app/admin/proposal.rb by rubocop

This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

Class User has 35 methods (exceeds 20 allowed). Consider refactoring.
Open

class User < ActiveRecord::Base
  has_paper_trail class_name: "C2Version"

  validates :client_slug, inclusion: {
    in: ->(_) { Proposal.client_slugs },
Severity: Minor
Found in app/models/user.rb - About 4 hrs to fix

    Class WorkOrder has 34 methods (exceeds 20 allowed). Consider refactoring.
    Open

      class WorkOrder < ActiveRecord::Base
        # must define before include PurchaseCardMixin
        def self.purchase_amount_column_name
          :amount
        end
    Severity: Minor
    Found in app/models/ncr/work_order.rb - About 4 hrs to fix

      Block has too many lines. [71/25]
      Open

      C2::Application.routes.draw do
        use_doorkeeper do
          controllers applications: "oauth/applications"
        end
      
      
      Severity: Minor
      Found in config/routes.rb by rubocop

      This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

      Assignment Branch Condition size for base_fields is too high. [34/15]
      Open

          def base_fields
            [
              [translated_key("project_title"), object.project_title],
              [translated_key("description"), object.description],
              [translated_key("approving_official"), object.approving_official],

      This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

      Class ProposalsController has 31 methods (exceeds 20 allowed). Consider refactoring.
      Open

      class ProposalsController < ApplicationController
        include TokenAuth
      
        skip_before_action :authenticate_user!, only: [:approve, :complete]
        skip_before_action :check_disabled_client, only: [:approve, :complete]
      Severity: Minor
      Found in app/controllers/proposals_controller.rb - About 3 hrs to fix

        Class Procurement has 30 methods (exceeds 20 allowed). Consider refactoring.
        Open

          class Procurement < ActiveRecord::Base
            URGENCY = {
              10 => "I need it yesterday",
              20 => "I'm patient but would like w/in a week",
              30 => "Whenever",
        Severity: Minor
        Found in app/models/gsa18f/procurement.rb - About 3 hrs to fix

          Block has too many lines. [65/25]
          Open

            included do
              include Elasticsearch::Model
          
              after_commit on: [:create] do
                if Rails.env.test?
          Severity: Minor
          Found in app/models/concerns/searchable.rb by rubocop

          This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

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

          class ApplicationController < ActionController::Base
            include Pundit
            include ReturnToHelper
            include MarkdownHelper
          
          
          Severity: Minor
          Found in app/controllers/application_controller.rb - About 3 hrs to fix

            Block has too many lines. [56/25]
            Open

            ActiveAdmin.register Step do
              actions :index, :show, :update, :edit
            
              filter :status
            
            
            Severity: Minor
            Found in app/admin/step.rb by rubocop

            This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

            Function ListConfig has 72 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function ListConfig() {
                var config = [
                  {
                    targets: "th-value-id"
                  },
            Severity: Major
            Found in app/assets/javascripts/details/views/list/list_config.js - About 2 hrs to fix

              Block has too many lines. [55/25]
              Open

              ActiveAdmin.register Delayed::Job, as: "Job" do
                actions :index, :show, :edit, :update, :destroy
              
                index do
                  column :id
              Severity: Minor
              Found in app/admin/job.rb by rubocop

              This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

              Block has too many lines. [55/25]
              Open

                namespace :dev do
                  desc "Sample data for local development environment"
                  task :prime, [:email] => ["db:setup"] do |_task, args|
                    include FactoryGirl::Syntax::Methods
              
              
              Severity: Minor
              Found in lib/tasks/dev.rake by rubocop

              This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.

              Assignment Branch Condition size for base_email_fields is too high. [24/15]
              Open

                  def base_email_fields
                    [
                      [amount_and_not_to_exceed, object.amount],
                      [translated_key("cl_number"), object.cl_number],
                      [translated_key("expense_type"), object.expense_type],

              This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

              Class ClientDataController has 24 methods (exceeds 20 allowed). Consider refactoring.
              Open

              class ClientDataController < ApplicationController
                include TokenAuth
                before_action -> { authorize model_class }, only: [:new, :create]
                before_action -> { authorize proposal }, only: [:edit, :update]
                before_action :build_client_data_instance, only: [:new, :create]
              Severity: Minor
              Found in app/controllers/client_data_controller.rb - About 2 hrs to fix

                Class Event has 24 methods (exceeds 20 allowed). Consider refactoring.
                Open

                  class Event < ActiveRecord::Base
                    URGENCY = {
                      10 => "I need it yesterday",
                      20 => "I'm patient but would like w/in a week",
                      30 => "Whenever"
                Severity: Minor
                Found in app/models/gsa18f/event.rb - About 2 hrs to fix

                  Class ProposalSearchDsl has 24 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                  class ProposalSearchDsl
                    include Elasticsearch::DSL
                  
                    attr_reader :params, :current_user, :query_str, :client_data_type
                  
                  
                  Severity: Minor
                  Found in app/queries/proposal_search_dsl.rb - About 2 hrs to fix

                    Class Dispatcher has 24 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                    class Dispatcher
                      def initialize(proposal)
                        @proposal = proposal
                      end
                    
                    
                    Severity: Minor
                    Found in app/models/dispatcher.rb - About 2 hrs to fix

                      Class ProposalPolicy has 23 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                      class ProposalPolicy
                        include ExceptionPolicy
                      
                        def initialize(user, record)
                          super(user, record)
                      Severity: Minor
                      Found in app/policies/proposal_policy.rb - About 2 hrs to fix

                        Class ProposalListingQuery has 23 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                        class ProposalListingQuery
                          attr_reader :params, :relation, :user
                        
                          def initialize(user, params, proposals = Proposal.all)
                            @params = params
                        Severity: Minor
                        Found in app/queries/proposal_listing_query.rb - About 2 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language