app/helpers/report_formatter_helper.rb
Assignment Branch Condition size for user_summary_report is too high. [31.42/15] Open
Open
def user_summary_report(line)
if @user_tagging_report[line.user.name].nil?
@user_tagging_report[line.user.name] = VmUserAnswerTagging.new(line.user, line.percentage, line.no_tagged, line.no_not_tagged, line.no_tagable)
else
@user_tagging_report[line.user.name].no_tagged += line.no_tagged
- Read upRead up
- Exclude checks
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
Open
def calibration(params, session)
assign_basics(params)
user = session[:user]
participant = AssignmentParticipant.where(parent_id: @id, user_id: user.id).first rescue nil
create_participant(@id, user.id) if participant.nil?
- Read upRead up
- Exclude checks
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 calculate_formatted_percentage is too high. [17.29/15] Open
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
- Read upRead up
- Exclude checks
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