josephyi/taric

View on GitHub

Showing 6 of 6 total issues

Cyclomatic complexity for default_request is too high. [9/6]
Open

      def default_request(env)
        @app.call(env).on_complete do |response|
          case response[:status]
            when 400
              raise Taric::FaradayMiddleware::BadRequest, 'Bad parameter, check API documentation'

This cop checks that the cyclomatic complexity of methods is not higher than the configured maximum. The cyclomatic complexity is the number of linearly independent paths through a method. The algorithm counts decision points and adds one.

An if statement (or unless or ?:) increases the complexity by one. An else branch does not, since it doesn't add a decision point. The && operator (or keyword and) can be converted to a nested if statement, and ||/or is shorthand for a sequence of ifs, so they also add one. Loops can be said to have an exit condition, so they add one.

Avoid parameter lists longer than 5 parameters. [8/5]
Open

      def matchlist(account_id:, begin_time: nil, end_index: nil, season: nil, champion: nil, begin_index: nil, queue: nil, end_time: nil)
Severity: Minor
Found in lib/taric/operation/match.rb by rubocop

This cop checks for methods with too many parameters. The maximum number of parameters is configurable. Keyword arguments can optionally be excluded from the total count.

TODO found
Open

TODO: finish writing this crap :p
Severity: Minor
Found in README.md by fixme

HACK found
Open

                 (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
Severity: Minor
Found in .rubocop.yml by fixme

TODO found
Open

                 (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
Severity: Minor
Found in .rubocop.yml by fixme

FIXME found
Open

                 (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
Severity: Minor
Found in .rubocop.yml by fixme
Severity
Category
Status
Source
Language