expertiza/expertiza

View on GitHub
app/helpers/report_formatter_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage
F
22%

Assignment Branch Condition size for user_summary_report is too high. [32.4/15]
Open

  def user_summary_report(line)
    if @user_tagging_report[line.user.name].nil?
      # E2082 Adding extra field of interval array into data structure
      @user_tagging_report[line.user.name] = VmUserAnswerTagging.new(line.user, line.percentage, line.no_tagged, line.no_not_tagged, line.no_tagable, line.tag_update_intervals)
    else

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

Assignment Branch Condition size for calibration is too high. [23.6/15]
Open

  def calibration(params, session)
    assign_basics(params)
    user = session[:user]
    participant = begin
                    AssignmentParticipant.where(parent_id: @id, user_id: user.id).first

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. [14/10]
Open

  def calibration(params, session)
    assign_basics(params)
    user = session[:user]
    participant = begin
                    AssignmentParticipant.where(parent_id: @id, user_id: user.id).first

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 calculate_formatted_percentage is too high. [17.29/15]
Open

  def calculate_formatted_percentage(line)
    number_tagged = @user_tagging_report[line.user.name].no_tagged.to_f
    number_taggable = @user_tagging_report[line.user.name].no_tagable
    formatted_percentage = format('%.1f', (number_tagged / number_taggable) * 100)
    @user_tagging_report[line.user.name].no_tagable.zero? ? '-' : formatted_percentage

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

Missing top-level module documentation comment.
Open

module ReportFormatterHelper

This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.

The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.

Example:

# bad
class Person
  # ...
end

# good
# Description/Explanation of Person class
class Person
  # ...
end

There are no issues that match your filters.

Category
Status