schurig/ynab-bank-importer

View on GitHub
lib/dumper/fints.rb

Summary

Maintainability
A
0 mins
Test Coverage

Assignment Branch Condition size for entry_date is too high. [20.62/15]
Wontfix

    def entry_date(transaction)
      data = transaction.data
      date = to_date(data['date'])

      return unless transaction.data['entry_date'] && date
Severity: Minor
Found in lib/dumper/fints.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. [12/10]
Wontfix

    def to_date(date, year = nil)
      if match = date.to_s.match(DATE)
        year ||= "20#{match['year'] || Date.today.strftime('%y')}"
        month = match['month']
        day = match['day']
Severity: Minor
Found in lib/dumper/fints.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 to_date is too high. [15.17/15]
Wontfix

    def to_date(date, year = nil)
      if match = date.to_s.match(DATE)
        year ||= "20#{match['year'] || Date.today.strftime('%y')}"
        month = match['month']
        day = match['day']
Severity: Minor
Found in lib/dumper/fints.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

Use == if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition.
Wontfix

      if match = date.to_s.match(DATE)
Severity: Minor
Found in lib/dumper/fints.rb by rubocop

This cop checks for assignments in the conditions of if/while/until.

Example:

# bad

if some_var = true
  do_something
end

Example:

# good

if some_var == true
  do_something
end

Line is too long. [81/80]
Wontfix

    # and modified so that it takes the last day of the month if the provided day
Severity: Minor
Found in lib/dumper/fints.rb by rubocop

There are no issues that match your filters.

Category
Status