app/services/ncr/reporter.rb

Summary

Maintainability
A
0 mins
Test Coverage

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

    def add_fields(csv, work_order)
      csv << [
        work_order.proposal.public_id,
        work_order.amount,
        find_completed_at(work_order),
Severity: Minor
Found in app/services/ncr/reporter.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.

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

    def add_fiscal_year_report_headers(csv)
      csv << [
        "Id",
        "Amount",
        "Date Completed",
Severity: Minor
Found in app/services/ncr/reporter.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.

Assignment Branch Condition size for add_fields is too high. [17/15]
Open

    def add_fields(csv, work_order)
      csv << [
        work_order.proposal.public_id,
        work_order.amount,
        find_completed_at(work_order),
Severity: Minor
Found in app/services/ncr/reporter.rb by rubocop

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

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

    def self.make_csv_row(proposal)
      [
        proposal_public_url(proposal),
        proposal.requester.email_address,
        proposal.client_data.decorate.current_approver_email_address,
Severity: Minor
Found in app/services/ncr/reporter.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.

Align .select with .pending on line 44.
Open

        .select { |p| p.individual_steps.pluck(:status)[0] == "actionable" }
Severity: Minor
Found in app/services/ncr/reporter.rb by rubocop

This cop checks the indentation of the method name part in method calls that span more than one line.

Example: EnforcedStyle: aligned

# bad
while myvariable
.b
  # do something
end

# good
while myvariable
      .b
  # do something
end

# good
Thing.a
     .b
     .c

Example: EnforcedStyle: indented

# good
while myvariable
  .b

  # do something
end

Example: EnforcedStyle: indentedrelativeto_receiver

# good
while myvariable
        .a
        .b

  # do something
end

# good
myvariable = Thing
               .a
               .b
               .c

Align .where with .pending on line 50.
Open

        .where(client_data_type: "Ncr::WorkOrder")
Severity: Minor
Found in app/services/ncr/reporter.rb by rubocop

This cop checks the indentation of the method name part in method calls that span more than one line.

Example: EnforcedStyle: aligned

# bad
while myvariable
.b
  # do something
end

# good
while myvariable
      .b
  # do something
end

# good
Thing.a
     .b
     .c

Example: EnforcedStyle: indented

# good
while myvariable
  .b

  # do something
end

Example: EnforcedStyle: indentedrelativeto_receiver

# good
while myvariable
        .a
        .b

  # do something
end

# good
myvariable = Thing
               .a
               .b
               .c

Align .sort_by with .pending on line 50.
Open

        .sort_by { |pr| pr.client_data.expense_type }
Severity: Minor
Found in app/services/ncr/reporter.rb by rubocop

This cop checks the indentation of the method name part in method calls that span more than one line.

Example: EnforcedStyle: aligned

# bad
while myvariable
.b
  # do something
end

# good
while myvariable
      .b
  # do something
end

# good
Thing.a
     .b
     .c

Example: EnforcedStyle: indented

# good
while myvariable
  .b

  # do something
end

Example: EnforcedStyle: indentedrelativeto_receiver

# good
while myvariable
        .a
        .b

  # do something
end

# good
myvariable = Thing
               .a
               .b
               .c

Align .select with .pending on line 50.
Open

        .select { |p| p.individual_steps.pluck(:status).last == "actionable" }
Severity: Minor
Found in app/services/ncr/reporter.rb by rubocop

This cop checks the indentation of the method name part in method calls that span more than one line.

Example: EnforcedStyle: aligned

# bad
while myvariable
.b
  # do something
end

# good
while myvariable
      .b
  # do something
end

# good
Thing.a
     .b
     .c

Example: EnforcedStyle: indented

# good
while myvariable
  .b

  # do something
end

Example: EnforcedStyle: indentedrelativeto_receiver

# good
while myvariable
        .a
        .b

  # do something
end

# good
myvariable = Thing
               .a
               .b
               .c

Align .where with .pending on line 44.
Open

        .where(client_data_type: "Ncr::WorkOrder")
Severity: Minor
Found in app/services/ncr/reporter.rb by rubocop

This cop checks the indentation of the method name part in method calls that span more than one line.

Example: EnforcedStyle: aligned

# bad
while myvariable
.b
  # do something
end

# good
while myvariable
      .b
  # do something
end

# good
Thing.a
     .b
     .c

Example: EnforcedStyle: indented

# good
while myvariable
  .b

  # do something
end

Example: EnforcedStyle: indentedrelativeto_receiver

# good
while myvariable
        .a
        .b

  # do something
end

# good
myvariable = Thing
               .a
               .b
               .c

There are no issues that match your filters.

Category
Status