Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug dcc 453 api not providing owner email anymore #3094

Merged

Conversation

johnpinto1
Copy link
Contributor

DCC bug 453 - Unlike in previous version of the DMP Roadmap a API user pointed oout that the Plan Owner email was missing in call /api/v0/statistics/plans.

DCC issue https://github.com/DigitalCurationCentre/DMPonline-Service/issues/453

Changed app/views/api/v0/statistics/plans.json.jbuilder to include owner
of Plan. So extra fragment of json in each Plan now includes

"owner": {
        "email": "[email protected]"
      },
as in previous version of Roadmap.

Now we get

{
"id": 89275,
"grant_number": null,
"title": "ABC's Test Plan",
"test_plan": true,
"template": {
"title": "XYZ Data Management Plan",
"id": 1369766789
},
"funder": {
"name": ""
},
"principal_investigator": {
"name": null
},
"owner": {
"email": "[email protected]"
},

"data_contact": {
"info": null
},
"description": "

aadfasd

",
"date_created": "2021-11-24 15:07:28 UTC",
"date_last_updated": "2021-12-02 14:54:08 UTC",
"completion": {
"total_questions": 53,
"answered_questions": 11
}
},

briri and others added 30 commits October 1, 2021 09:58
...............................................................................CCCCCCCCC.CC.CCCCCCC.CCCCCCCCCC...CC.CCCCCC..CCC.CCCCC....CCWCCCCCCCCCCCCC.CC................................................CCCCCCCCCCCCC.CC..CCCCCCCCCCCCCCC..CCCCCCC...........................CC...C.C.........C.....C.C..........CW...CCCCCCCC.CCC.CC.CWWCCCWWW..CCCCWCCCCCCCCC...............CC.CWC.C...C...C...CWCCCCWW...C.C.CCCCCCCWCCCCC.C..CCCCC.CCCCW.CCC..CCWCCCCC.CWCC..CCC.CC.C.CCCC.CCCCCCCCCCCCCC.CCCCCCCCC.CCCCC.C....C..C..........CC...C.C.CCC

Offenses:

app/helpers/annotations_helper.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module AnnotationsHelper.
module AnnotationsHelper
^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/application_helper.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module ApplicationHelper.
module ApplicationHelper
^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/application_helper.rb:22:26: C: Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use exact_match: false instead of exact_match = false. (https://rubystyle.guide#boolean-keyword-arguments)
  def active_page?(path, exact_match = false)
                         ^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:6:1: C: Style/Documentation: Missing top-level documentation comment for module ConditionsHelper.
module ConditionsHelper
^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:10:5: C: [Correctable] Style/CaseLikeIf: Convert if-elsif to case-when. (https://rubystyle.guide#case-vs-if-else)
    if object.is_a?(Plan) ...
    ^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:26:3: C: Metrics/AbcSize: Assignment Branch Condition size for answer_remove_list is too high. [<7, 21, 9> 23.9/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def answer_remove_list(answer, user = nil) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:26:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for answer_remove_list is too high. [8/7]
  def answer_remove_list(answer, user = nil) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:26:3: C: Metrics/PerceivedComplexity: Perceived complexity for answer_remove_list is too high. [9/8]
  def answer_remove_list(answer, user = nil) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:52:3: C: Metrics/AbcSize: Assignment Branch Condition size for email_trigger_list is too high. [<5, 17, 7> 19.05/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def email_trigger_list(answer) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:84:3: C: Metrics/AbcSize: Assignment Branch Condition size for num_section_questions is too high. [<8, 22, 11> 25.87/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def num_section_questions(plan, section, phase = nil) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:84:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for num_section_questions is too high. [9/7]
  def num_section_questions(plan, section, phase = nil) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:84:3: C: Metrics/PerceivedComplexity: Perceived complexity for num_section_questions is too high. [9/8]
  def num_section_questions(plan, section, phase = nil) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:137:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for later_question_list is too high. [12/7]
  def later_question_list(question) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:137:3: C: Metrics/MethodLength: Method has too many lines. [21/20] (https://rubystyle.guide#short-methods)
  def later_question_list(question) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:137:3: C: Metrics/PerceivedComplexity: Perceived complexity for later_question_list is too high. [13/8]
  def later_question_list(question) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:170:9: C: Style/StringConcatenation: Prefer string interpolation to string concatenation. (https://rubystyle.guide#string-interpolation)
    raw 'Qn. ' + question.number.to_s + ': ' + ...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:178:9: C: Style/StringConcatenation: Prefer string interpolation to string concatenation. (https://rubystyle.guide#string-interpolation)
    raw 'Sec. ' + section.number.to_s + ': ' + ...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:188:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for condition_to_text is too high. [8/7]
  def condition_to_text(conditions) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:188:3: C: Metrics/PerceivedComplexity: Perceived complexity for condition_to_text is too high. [9/8]
  def condition_to_text(conditions) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:193:24: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation. (https://rubystyle.guide#string-interpolation)
      return_string += '<dd>' + _('Answering') + ' '
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:200:40: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation. (https://rubystyle.guide#string-interpolation)
        rems = remove_data.map { |rem| '"' + Question.find(rem).text + '"' }
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:207:5: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation. (https://rubystyle.guide#string-interpolation)
    return_string + '</dd>'
    ^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:212:5: C: [Correctable] Style/CaseLikeIf: Convert if-elsif to case-when. (https://rubystyle.guide#case-vs-if-else)
    if object.is_a?(Integer) # when remove question id ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:226:3: C: Metrics/AbcSize: Assignment Branch Condition size for conditions_to_param_form is too high. [<6, 19, 7> 21.12/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def conditions_to_param_form(conditions) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:226:3: C: Metrics/MethodLength: Method has too many lines. [22/20] (https://rubystyle.guide#short-methods)
  def conditions_to_param_form(conditions) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/conditions_helper.rb:229:15: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation. (https://rubystyle.guide#string-interpolation)
      title = 'condition' + condition[:number].to_s
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/customizable_template_link_helper.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module CustomizableTemplateLinkHelper.
module CustomizableTemplateLinkHelper
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/customizable_template_link_helper.rb:6:3: C: Metrics/AbcSize: Assignment Branch Condition size for link_to_customizable_template is too high. [<4, 19, 9> 21.4/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def link_to_customizable_template(name, customization, template) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/customizable_template_link_helper.rb:6:3: C: Metrics/PerceivedComplexity: Perceived complexity for link_to_customizable_template is too high. [9/8]
  def link_to_customizable_template(name, customization, template) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/exports_helper.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module ExportsHelper.
module ExportsHelper
^^^^^^^^^^^^^^^^^^^^
app/helpers/feedbacks_helper.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module FeedbacksHelper.
module FeedbacksHelper
^^^^^^^^^^^^^^^^^^^^^^
app/helpers/feedbacks_helper.rb:5:8: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
    _('%{application_name}: Your plan has been submitted for feedback')
       ^^^^^^^^^^^^^^^^^^^
app/helpers/feedbacks_helper.rb:9:17: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
    _('<p>Hello %{user_name}.</p>'\
                ^^^^^^^^^^^^
app/helpers/feedbacks_helper.rb:10:23: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
      "<p>Your plan \"%{plan_name}\" has been submitted for feedback from an
                      ^^^^^^^^^^^^
app/helpers/feedbacks_helper.rb:13:10: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
      at %{organisation_email}.</p>")
         ^^^^^^^^^^^^^^^^^^^^^
app/helpers/identifier_helper.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module IdentifierHelper.
module IdentifierHelper
^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/identifier_helper.rb:8:33: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation. (https://rubystyle.guide#string-interpolation)
    prefix = with_scheme_name ? id.identifier_scheme.description + ': ' : ''
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/languages_helper.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module LanguagesHelper.
module LanguagesHelper
^^^^^^^^^^^^^^^^^^^^^^
app/helpers/mailer_helper.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module MailerHelper.
module MailerHelper
^^^^^^^^^^^^^^^^^^^
app/helpers/notifications_helper.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module NotificationsHelper.
module NotificationsHelper
^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/orgs_helper.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module OrgsHelper.
module OrgsHelper
^^^^^^^^^^^^^^^^^
app/helpers/orgs_helper.rb:13:40: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
    format(_("<p>A data librarian from %{org_name} will respond to your request within 48
                                       ^^^^^^^^^^^
app/helpers/orgs_helper.rb:15:11: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
       at %{organisation_email}.</p>"), organisation_email: email, org_name: org.name)
          ^^^^^^^^^^^^^^^^^^^^^
app/helpers/perms_helper.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module PermsHelper.
module PermsHelper
^^^^^^^^^^^^^^^^^^
app/helpers/plans_helper.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module PlansHelper.
module PlansHelper
^^^^^^^^^^^^^^^^^^
app/helpers/sections_helper.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module SectionsHelper.
module SectionsHelper
^^^^^^^^^^^^^^^^^^^^^
app/helpers/settings_template_helper.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module SettingsTemplateHelper.
module SettingsTemplateHelper
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/settings_template_helper.rb:5:3: C: Metrics/AbcSize: Assignment Branch Condition size for admin_field_t is too high. [<0, 12, 19> 22.47/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def admin_field_t(admin_field) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/settings_template_helper.rb:5:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for admin_field_t is too high. [11/7]
  def admin_field_t(admin_field) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/settings_template_helper.rb:5:3: C: Metrics/PerceivedComplexity: Perceived complexity for admin_field_t is too high. [11/8]
  def admin_field_t(admin_field) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/super_admin/orgs/merge_helper.rb:5:5: C: Style/Documentation: Missing top-level documentation comment for module SuperAdmin::Orgs::MergeHelper.
    module MergeHelper
    ^^^^^^^^^^^^^^^^^^
app/helpers/super_admin/orgs/merge_helper.rb:17:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for column_content is too high. [14/7]
      def column_content(entries:, orcid:) ...
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/super_admin/orgs/merge_helper.rb:17:7: C: Metrics/PerceivedComplexity: Perceived complexity for column_content is too high. [9/8]
      def column_content(entries:, orcid:) ...
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/super_admin/orgs/merge_helper.rb:28:44: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
                   format(_('Guidance for: %{themes}'), themes: entry.themes.collect(&:title).join(', '))
                                           ^^^^^^^^^
app/helpers/super_admin/orgs/merge_helper.rb:50:43: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
        html = format(_("<p>The following %{object_types} will be moved over to '%{org_name}':</p>"),
                                          ^^^^^^^^^^^^^^^
app/helpers/super_admin/orgs/merge_helper.rb:50:82: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
        html = format(_("<p>The following %{object_types} will be moved over to '%{org_name}':</p>"),
                                                                                 ^^^^^^^^^^^
app/helpers/template_helper.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module TemplateHelper.
module TemplateHelper
^^^^^^^^^^^^^^^^^^^^^
app/helpers/template_helper.rb:36:3: C: Metrics/AbcSize: Assignment Branch Condition size for direct_link is too high. [<3, 18, 10> 20.81/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def direct_link(template, hidden = false, text = nil, id = nil) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/template_helper.rb:36:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for direct_link is too high. [10/7]
  def direct_link(template, hidden = false, text = nil, id = nil) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/template_helper.rb:36:3: C: Metrics/PerceivedComplexity: Perceived complexity for direct_link is too high. [11/8]
  def direct_link(template, hidden = false, text = nil, id = nil) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/template_helper.rb:36:29: C: Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use hidden: false instead of hidden = false. (https://rubystyle.guide#boolean-keyword-arguments)
  def direct_link(template, hidden = false, text = nil, id = nil)
                            ^^^^^^^^^^^^^^
app/helpers/usage_helper.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module UsageHelper.
module UsageHelper
^^^^^^^^^^^^^^^^^^
app/helpers/usage_helper.rb:17:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for prep_data_for_template_plans_chart is too high. [12/7]
  def prep_data_for_template_plans_chart(data:, subset: 'by_template') ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/usage_helper.rb:17:3: C: Metrics/MethodLength: Method has too many lines. [25/20] (https://rubystyle.guide#short-methods)
  def prep_data_for_template_plans_chart(data:, subset: 'by_template') ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/usage_helper.rb:17:3: C: Metrics/PerceivedComplexity: Perceived complexity for prep_data_for_template_plans_chart is too high. [12/8]
  def prep_data_for_template_plans_chart(data:, subset: 'by_template') ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/usage_helper.rb:59:3: C: Metrics/AbcSize: Assignment Branch Condition size for plans_per_template_ranges is too high. [<0, 20, 0> 20/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def plans_per_template_ranges ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/mailers/user_mailer.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for class UserMailer.
class UserMailer < ActionMailer::Base
^^^^^^^^^^^^^^^^
app/mailers/user_mailer.rb:12:3: C: Metrics/AbcSize: Assignment Branch Condition size for welcome_notification is too high. [<4, 17, 1> 17.49/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def welcome_notification(user) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/mailers/user_mailer.rb:15:62: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
    @email_subject  = format(_('Query or feedback related to %{tool_name}'), tool_name: tool_name)
                                                             ^^^^^^^^^^^^
app/mailers/user_mailer.rb:22:42: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
           subject: format(_('Welcome to %{tool_name}'), tool_name: tool_name))
                                         ^^^^^^^^^^^^
app/mailers/user_mailer.rb:26:3: C: Metrics/AbcSize: Assignment Branch Condition size for question_answered is too high. [<10, 21, 0> 23.26/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def question_answered(data, user, answer, _options_string) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/mailers/user_mailer.rb:54:57: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
           subject: format(_('A Data Management Plan in %{tool_name} has been shared with you'), tool_name: tool_name))
                                                        ^^^^^^^^^^^^
app/mailers/user_mailer.rb:69:80: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
           subject: format(_('Changed permissions on a Data Management Plan in %{tool_name}'), tool_name: tool_name))
                                                                               ^^^^^^^^^^^^
app/mailers/user_mailer.rb:82:63: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
           subject: format(_('Permissions removed on a DMP in %{tool_name}'), tool_name: tool_name))
                                                              ^^^^^^^^^^^^
app/mailers/user_mailer.rb:98:31: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
           subject: format(_('%{user_name} has requested feedback on a %{tool_name} plan'), tool_name: tool_name,
                              ^^^^^^^^^^^^
app/mailers/user_mailer.rb:98:72: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
           subject: format(_('%{user_name} has requested feedback on a %{tool_name} plan'), tool_name: tool_name,
                                                                       ^^^^^^^^^^^^
app/mailers/user_mailer.rb:99:121: C: Layout/LineLength: Line is too long. [122/120] (https://rubystyle.guide#max-line-length)
                                                                                            user_name: @user.name(false)))
                                                                                                                        ^^
app/mailers/user_mailer.rb:103:3: C: Metrics/AbcSize: Assignment Branch Condition size for feedback_complete is too high. [<7, 22, 2> 23.17/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def feedback_complete(recipient, plan, requestor) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/mailers/user_mailer.rb:119:31: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
           subject: format(_('%{tool_name}: Expert feedback has been provided for %{plan_title}'),
                              ^^^^^^^^^^^^
app/mailers/user_mailer.rb:119:83: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
           subject: format(_('%{tool_name}: Expert feedback has been provided for %{plan_title}'),
                                                                                  ^^^^^^^^^^^^^
app/mailers/user_mailer.rb:135:55: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
           subject: format(_('DMP Visibility Changed: %{plan_title}'), plan_title: @plan.title))
                                                      ^^^^^^^^^^^^^
app/mailers/user_mailer.rb:163:31: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
           subject: format(_('%{tool_name}: A new comment was added to %{plan_title}'), tool_name: tool_name,
                              ^^^^^^^^^^^^
app/mailers/user_mailer.rb:163:72: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
           subject: format(_('%{tool_name}: A new comment was added to %{plan_title}'), tool_name: tool_name,
                                                                       ^^^^^^^^^^^^^
app/mailers/user_mailer.rb:178:67: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
           subject: format(_('Administrator privileges granted in %{tool_name}'), tool_name: tool_name))
                                                                  ^^^^^^^^^^^^
app/mailers/user_mailer.rb:182:3: C: Metrics/AbcSize: Assignment Branch Condition size for api_credentials is too high. [<3, 18, 2> 18.36/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def api_credentials(api_client) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/mailers/user_mailer.rb:192:31: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
           subject: format(_('%{tool_name} API changes'), tool_name: tool_name))
                              ^^^^^^^^^^^^
app/models/annotation.rb:28:1: C: Style/Documentation: Missing top-level documentation comment for class Annotation.
class Annotation < ApplicationRecord
^^^^^^^^^^^^^^^^
app/models/answer.rb:31:1: C: Style/Documentation: Missing top-level documentation comment for class Answer.
class Answer < ApplicationRecord
^^^^^^^^^^^^
app/models/api_client.rb:27:1: C: Style/Documentation: Missing top-level documentation comment for class ApiClient.
class ApiClient < ApplicationRecord
^^^^^^^^^^^^^^^
app/models/application_record.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for class ApplicationRecord.
class ApplicationRecord < ActiveRecord::Base
^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/acts_as_sortable.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module ActsAsSortable.
module ActsAsSortable
^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/acts_as_sortable.rb:6:3: C: Style/Documentation: Missing top-level documentation comment for module ActsAsSortable::ClassMethods.
  module ClassMethods
  ^^^^^^^^^^^^^^^^^^^
app/models/concerns/date_rangeable.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module DateRangeable.
module DateRangeable
^^^^^^^^^^^^^^^^^^^^
app/models/concerns/date_rangeable.rb:6:3: C: Style/Documentation: Missing top-level documentation comment for module DateRangeable::ClassMethods.
  module ClassMethods
  ^^^^^^^^^^^^^^^^^^^
app/models/concerns/date_rangeable.rb:17:23: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
      query = format('%{table}.%{field} BETWEEN ? AND ?', table: table_name, field: field)
                      ^^^^^^^^
app/models/concerns/date_rangeable.rb:17:32: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
      query = format('%{table}.%{field} BETWEEN ? AND ?', table: table_name, field: field)
                               ^^^^^^^^
app/models/concerns/exportable_plan.rb:10:20: C: Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use coversheet: false instead of coversheet = false. (https://rubystyle.guide#boolean-keyword-arguments)
  def as_pdf(user, coversheet = false)
                   ^^^^^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:15:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for as_csv is too high. [15/7]
  def as_csv(user, ...
  ^^^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:15:3: C: Metrics/MethodLength: Method has too many lines. [23/20] (https://rubystyle.guide#short-methods)
  def as_csv(user, ...
  ^^^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:15:3: C: Metrics/PerceivedComplexity: Perceived complexity for as_csv is too high. [16/8]
  def as_csv(user, ...
  ^^^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:16:14: C: Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use headings: true instead of headings = true. (https://rubystyle.guide#boolean-keyword-arguments)
             headings = true,
             ^^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:17:14: C: Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use unanswered: true instead of unanswered = true. (https://rubystyle.guide#boolean-keyword-arguments)
             unanswered = true,
             ^^^^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:19:14: C: Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use show_custom_sections: true instead of show_custom_sections = true. (https://rubystyle.guide#boolean-keyword-arguments)
             show_custom_sections = true,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:20:14: C: Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use show_coversheet: false instead of show_coversheet = false. (https://rubystyle.guide#boolean-keyword-arguments)
             show_coversheet = false)
             ^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:55:21: C: Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use coversheet: false instead of coversheet = false. (https://rubystyle.guide#boolean-keyword-arguments)
  def prepare(user, coversheet = false)
                    ^^^^^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:95:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for prepare_coversheet is too high. [9/7]
  def prepare_coversheet ...
  ^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:95:3: C: Metrics/PerceivedComplexity: Perceived complexity for prepare_coversheet is too high. [9/8]
  def prepare_coversheet ...
  ^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:128:3: C: Metrics/PerceivedComplexity: Perceived complexity for prepare_coversheet_for_csv is too high. [9/8]
  def prepare_coversheet_for_csv(csv, _headings, hash) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:133:28: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
            end, format(_('%{authors}'), authors: hash[:attribution].join(', '))]
                           ^^^^^^^^^^
app/models/concerns/exportable_plan.rb:134:40: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
    csv << ['Affiliation: ', format(_('%{affiliation}'), affiliation: hash[:affiliation])]
                                       ^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:136:42: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
             [_('Template: '), format(_('%{funder}'), funder: hash[:funder])]
                                         ^^^^^^^^^
app/models/concerns/exportable_plan.rb:138:42: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
             [_('Template: '), format(_('%{template}'), template: hash[:template] + hash[:customizer])]
                                         ^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:140:44: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
    csv << [_('Grant number: '), format(_('%{grant_number}'), grant_number: grant&.value)] if grant&.value.present?
                                           ^^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:142:50: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
      csv << [_('Project abstract: '), format(_('%{description}'), description: Nokogiri::HTML(description).text)]
                                                 ^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:144:45: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
    csv << [_('Last modified: '), format(_('%{date}'), date: updated_at.to_date.strftime('%d-%m-%Y'))]
                                            ^^^^^^^
app/models/concerns/exportable_plan.rb:159:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for show_section_for_csv is too high. [11/7]
  def show_section_for_csv(csv, phase, section, headings, unanswered, hash) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:159:3: C: Metrics/PerceivedComplexity: Perceived complexity for show_section_for_csv is too high. [15/8]
  def show_section_for_csv(csv, phase, section, headings, unanswered, hash) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/exportable_plan.rb:195:3: C: Metrics/AbcSize: Assignment Branch Condition size for record_plan_export is too high. [<8, 16, 2> 18/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def record_plan_export(user, format) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/identifiable.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module Identifiable.
module Identifiable
^^^^^^^^^^^^^^^^^^^
app/models/concerns/identifiable.rb:27:5: C: Metrics/AbcSize: Assignment Branch Condition size for from_identifiers is too high. [<4, 19, 8> 21/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
    def self.from_identifiers(array:) ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/identifiable.rb:27:5: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for from_identifiers is too high. [9/7]
    def self.from_identifiers(array:) ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/identifiable.rb:27:5: C: Metrics/PerceivedComplexity: Perceived complexity for from_identifiers is too high. [9/8]
    def self.from_identifiers(array:) ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/json_link_validator.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for module JSONLinkValidator.
module JSONLinkValidator
^^^^^^^^^^^^^^^^^^^^^^^^
app/models/condition.rb:27:1: C: Style/Documentation: Missing top-level documentation comment for class Condition.
class Condition < ApplicationRecord
^^^^^^^^^^^^^^^
app/models/contributor.rb:29:1: C: Style/Documentation: Missing top-level documentation comment for class Contributor.
class Contributor < ApplicationRecord
^^^^^^^^^^^^^^^^^
app/models/contributor.rb:98:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for == is too high. [8/7]
  def ==(other) ...
  ^^^^^^^^^^^^^
app/models/contributor.rb:111:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for merge is too high. [11/7]
  def merge(other) ...
  ^^^^^^^^^^^^^^^^
app/models/contributor.rb:111:3: C: Metrics/PerceivedComplexity: Perceived complexity for merge is too high. [11/8]
  def merge(other) ...
  ^^^^^^^^^^^^^^^^
app/models/exported_plan.rb:109:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for as_csv is too high. [12/7]
  def as_csv(sections, unanswered_questions, question_headings) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/exported_plan.rb:109:3: C: Metrics/PerceivedComplexity: Perceived complexity for as_csv is too high. [15/8]
  def as_csv(sections, unanswered_questions, question_headings) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/exported_plan.rb:159:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for as_txt is too high. [14/7]
  def as_txt(sections, unanswered_questions, question_headings, details) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/exported_plan.rb:159:3: C: Metrics/PerceivedComplexity: Perceived complexity for as_txt is too high. [17/8]
  def as_txt(sections, unanswered_questions, question_headings, details) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/exported_plan.rb:161:15: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation. (https://rubystyle.guide#string-interpolation)
    output += "\n" + _('Details') + "\n\n"
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/exported_plan.rb:166:21: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation. (https://rubystyle.guide#string-interpolation)
                    admin_field_t(at.to_s) + ': ' + value + "\n"
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/exported_plan.rb:168:21: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation. (https://rubystyle.guide#string-interpolation)
                    admin_field_t(at.to_s) + ': ' + _('-') + "\n"
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/exported_plan.rb:185:21: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation. (https://rubystyle.guide#string-interpolation)
          output += _('Question not answered.') + "\n"
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/exported_plan.rb:208:22: C: [Correctable] Style/CaseLikeIf: Convert if-elsif to case-when. (https://rubystyle.guide#case-vs-if-else)
                     if question_settings == :all ...
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/guidance.rb:36:1: C: Style/Documentation: Missing top-level documentation comment for class Guidance.
class Guidance < ApplicationRecord
^^^^^^^^^^^^^^
app/models/guidance.rb:86:3: C: Metrics/AbcSize: Assignment Branch Condition size for can_view? is too high. [<5, 17, 6> 18.71/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def self.can_view?(user, id) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/guidance_group.rb:27:1: C: Style/Documentation: Missing top-level documentation comment for class GuidanceGroup.
class GuidanceGroup < ApplicationRecord
^^^^^^^^^^^^^^^^^^^
app/models/guidance_group.rb:139:3: C: Metrics/AbcSize: Assignment Branch Condition size for merge! is too high. [<1, 19, 4> 19.44/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def merge!(to_be_merged:) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/identifier.rb:69:3: C: Metrics/AbcSize: Assignment Branch Condition size for value= is too high. [<2, 17, 6> 18.14/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def value=(val) ...
  ^^^^^^^^^^^^^^^
app/models/identifier_scheme.rb:18:1: C: Style/Documentation: Missing top-level documentation comment for class IdentifierScheme.
class IdentifierScheme < ApplicationRecord
^^^^^^^^^^^^^^^^^^^^^^
app/models/language.rb:14:1: C: Style/Documentation: Missing top-level documentation comment for class Language.
class Language < ApplicationRecord
^^^^^^^^^^^^^^
app/models/notification.rb:20:1: C: Style/Documentation: Missing top-level documentation comment for class Notification.
class Notification < ApplicationRecord
^^^^^^^^^^^^^^^^^^
app/models/org.rb:234:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for org_type_to_s is too high. [8/7]
  def org_type_to_s ...
  ^^^^^^^^^^^^^^^^^
app/models/org.rb:284:3: C: Metrics/AbcSize: Assignment Branch Condition size for org_admin_plans is too high. [<1, 21, 2> 21.12/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def org_admin_plans ...
  ^^^^^^^^^^^^^^^^^^^
app/models/org.rb:355:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for merge_attributes! is too high. [13/7]
  def merge_attributes!(to_be_merged:) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/org.rb:355:3: C: Metrics/PerceivedComplexity: Perceived complexity for merge_attributes! is too high. [13/8]
  def merge_attributes!(to_be_merged:) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/org.rb:370:3: C: Metrics/AbcSize: Assignment Branch Condition size for merge_departments! is too high. [<3, 19, 6> 20.15/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def merge_departments!(to_be_merged:) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/perm.rb:13:1: C: Style/Documentation: Missing top-level documentation comment for class Perm.
class Perm < ApplicationRecord
^^^^^^^^^^
app/models/plan.rb:43:1: C: Style/Documentation: Missing top-level documentation comment for class Plan.
class Plan < ApplicationRecord
^^^^^^^^^^
app/models/plan.rb:236:3: C: Metrics/AbcSize: Assignment Branch Condition size for deep_copy is too high. [<7, 16, 3> 17.72/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def self.deep_copy(plan) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^
app/models/plan.rb:280:3: C: Metrics/AbcSize: Assignment Branch Condition size for answer is too high. [<12, 20, 7> 24.35/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def answer(qid, create_if_missing = true) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/plan.rb:280:19: C: Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use create_if_missing: true instead of create_if_missing = true. (https://rubystyle.guide#boolean-keyword-arguments)
  def answer(qid, create_if_missing = true)
                  ^^^^^^^^^^^^^^^^^^^^^^^^
app/models/plan.rb:367:3: C: Metrics/AbcSize: Assignment Branch Condition size for readable_by? is too high. [<1, 17, 8> 18.81/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def readable_by?(user_id) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/plan.rb:367:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for readable_by? is too high. [8/7]
  def readable_by?(user_id) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/plan.rb:367:3: C: Metrics/PerceivedComplexity: Perceived complexity for readable_by? is too high. [9/8]
  def readable_by?(user_id) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/plan.rb:577:3: C: Metrics/AbcSize: Assignment Branch Condition size for grant= is too high. [<4, 15, 8> 17.46/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def grant=(params) ...
  ^^^^^^^^^^^^^^^^^^
app/models/plan.rb:577:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for grant= is too high. [8/7]
  def grant=(params) ...
  ^^^^^^^^^^^^^^^^^^
app/models/pref.rb:12:1: C: Style/Documentation: Missing top-level documentation comment for class Pref.
class Pref < ApplicationRecord
^^^^^^^^^^
app/models/question.rb:140:3: C: Metrics/AbcSize: Assignment Branch Condition size for guidance_for_org is too high. [<5, 19, 5> 20.27/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def guidance_for_org(org) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/question.rb:259:3: C: Metrics/AbcSize: Assignment Branch Condition size for check_remove_conditions is too high. [<3, 16, 6> 17.35/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def check_remove_conditions ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/question_format.rb:16:1: C: Style/Documentation: Missing top-level documentation comment for class QuestionFormat.
class QuestionFormat < ApplicationRecord
^^^^^^^^^^^^^^^^^^^^
app/models/question_option.rb:24:1: C: Style/Documentation: Missing top-level documentation comment for class QuestionOption.
class QuestionOption < ApplicationRecord
^^^^^^^^^^^^^^^^^^^^
app/models/role.rb:26:1: C: Style/Documentation: Missing top-level documentation comment for class Role.
class Role < ApplicationRecord
^^^^^^^^^^
app/models/section.rb:27:1: C: Style/Documentation: Missing top-level documentation comment for class Section.
class Section < ApplicationRecord
^^^^^^^^^^^^^
app/models/section_sorter.rb:31:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for sort! is too high. [17/7]
  def sort! ...
  ^^^^^^^^^
app/models/section_sorter.rb:31:3: C: Metrics/PerceivedComplexity: Perceived complexity for sort! is too high. [19/8]
  def sort! ...
  ^^^^^^^^^
app/models/section_sorter.rb:34:5: W: Lint/DuplicateBranch: Duplicate branch body detected.
    elsif all_sections_modifiable? ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/settings/template.rb:17:3: C: Style/Documentation: Missing top-level documentation comment for class Settings::Template.
  class Template < RailsSettings::SettingObject
  ^^^^^^^^^^^^^^
app/models/settings/template.rb:77:11: C: [Correctable] Style/CaseLikeIf: Convert if-elsif to case-when. (https://rubystyle.guide#case-vs-if-else)
          if key == :missing_key ...
          ^^^^^^^^^^^^^^^^^^^^^^
app/models/settings/template.rb:104:39: C: [Correctable] Style/AndOr: Use || instead of or. (https://rubystyle.guide#no-and-or-or)
      unless formatting[:margin].nil? or !formatting[:margin].is_a?(Hash)
                                      ^^
app/models/stat.rb:18:1: C: Style/Documentation: Missing top-level documentation comment for class Stat.
class Stat < ApplicationRecord
^^^^^^^^^^
app/models/stat_created_plan.rb:20:1: C: Style/Documentation: Missing top-level documentation comment for class StatCreatedPlan.
class StatCreatedPlan < Stat
^^^^^^^^^^^^^^^^^^^^^
app/models/stat_created_plan.rb:52:5: C: Metrics/AbcSize: Assignment Branch Condition size for to_csv_by_template is too high. [<14, 22, 7> 27/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
    def to_csv_by_template(created_plans, sep = ',') ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/stat_created_plan.rb:52:5: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for to_csv_by_template is too high. [8/7]
    def to_csv_by_template(created_plans, sep = ',') ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/stat_created_plan.rb:52:5: C: Metrics/MethodLength: Method has too many lines. [21/20] (https://rubystyle.guide#short-methods)
    def to_csv_by_template(created_plans, sep = ',') ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/stat_created_plan/create_or_update.rb:4:3: C: Style/Documentation: Missing top-level documentation comment for class StatCreatedPlan::CreateOrUpdate.
  class CreateOrUpdate
  ^^^^^^^^^^^^^^^^^^^^
app/models/stat_created_plan/create_or_update.rb:6:7: C: Metrics/MethodLength: Method has too many lines. [23/20] (https://rubystyle.guide#short-methods)
      def do(start_date:, end_date:, org:, filtered: false) ...
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/stat_exported_plan.rb:18:1: C: Style/Documentation: Missing top-level documentation comment for class StatExportedPlan.
class StatExportedPlan < Stat
^^^^^^^^^^^^^^^^^^^^^^
app/models/stat_exported_plan/create_or_update.rb:4:3: C: Style/Documentation: Missing top-level documentation comment for class StatExportedPlan::CreateOrUpdate.
  class CreateOrUpdate
  ^^^^^^^^^^^^^^^^^^^^
app/models/stat_joined_user.rb:18:1: C: Style/Documentation: Missing top-level documentation comment for class StatJoinedUser.
class StatJoinedUser < Stat
^^^^^^^^^^^^^^^^^^^^
app/models/stat_joined_user/create_or_update.rb:4:3: C: Style/Documentation: Missing top-level documentation comment for class StatJoinedUser::CreateOrUpdate.
  class CreateOrUpdate
  ^^^^^^^^^^^^^^^^^^^^
app/models/stat_shared_plan.rb:18:1: C: Style/Documentation: Missing top-level documentation comment for class StatSharedPlan.
class StatSharedPlan < Stat
^^^^^^^^^^^^^^^^^^^^
app/models/stat_shared_plan/create_or_update.rb:4:3: C: Style/Documentation: Missing top-level documentation comment for class StatSharedPlan::CreateOrUpdate.
  class CreateOrUpdate
  ^^^^^^^^^^^^^^^^^^^^
app/models/template.rb:279:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for deep_copy is too high. [12/7]
  def deep_copy(attributes: {}, **options) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/template.rb:279:3: C: Metrics/MethodLength: Method has too many lines. [23/20] (https://rubystyle.guide#short-methods)
  def deep_copy(attributes: {}, **options) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/template.rb:279:3: C: Metrics/PerceivedComplexity: Perceived complexity for deep_copy is too high. [12/8]
  def deep_copy(attributes: {}, **options) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/template.rb:379:34: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
        title: format(_('Copy of %{template}'), template: title)
                                 ^^^^^^^^^^^
app/models/template.rb:433:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for publishability is too high. [13/7]
  def publishability ...
  ^^^^^^^^^^^^^^^^^^
app/models/template.rb:433:3: C: Metrics/PerceivedComplexity: Perceived complexity for publishability is too high. [13/8]
  def publishability ...
  ^^^^^^^^^^^^^^^^^^
app/models/template.rb:451:88: C: [Correctable] Style/AndOr: Use && instead of and. (https://rubystyle.guide#no-and-or-or)
    unless phases.map { |p| p.sections.count.positive? }.reduce(true) { |fin, val| fin and val }
                                                                                       ^^^
app/models/template.rb:456:91: C: [Correctable] Style/AndOr: Use && instead of and. (https://rubystyle.guide#no-and-or-or)
    unless sections.map { |s| s.questions.count.positive? }.reduce(true) { |fin, val| fin and val }
                                                                                          ^^^
app/models/theme.rb:15:1: C: Style/Documentation: Missing top-level documentation comment for class Theme.
class Theme < ApplicationRecord
^^^^^^^^^^^
app/models/token_permission_type.rb:14:1: C: Style/Documentation: Missing top-level documentation comment for class TokenPermissionType.
class TokenPermissionType < ApplicationRecord
^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/user.rb:218:12: C: Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use use_email: true instead of use_email = true. (https://rubystyle.guide#boolean-keyword-arguments)
  def name(use_email = true)
           ^^^^^^^^^^^^^^^^
app/models/user.rb:248:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for can_org_admin? is too high. [8/7]
  def can_org_admin? ...
  ^^^^^^^^^^^^^^^^^^
app/models/user.rb:380:44: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
                                          '%{application_name} has been shared with you'), application_name: ApplicationService.application_name))
                                           ^^^^^^^^^^^^^^^^^^^
app/models/user.rb:380:121: C: Layout/LineLength: Line is too long. [146/120] (https://rubystyle.guide#max-line-length)
                                          '%{application_name} has been shared with you'), application_name: ApplicationService.application_name))
                                                                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/user.rb:412:3: C: Metrics/AbcSize: Assignment Branch Condition size for archive is too high. [<10, 15, 0> 18.03/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def archive ...
  ^^^^^^^^^^^
app/models/user.rb:429:3: C: Metrics/AbcSize: Assignment Branch Condition size for merge is too high. [<1, 17, 0> 17.03/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def merge(to_be_merged) ...
  ^^^^^^^^^^^^^^^^^^^^^^^
app/models/user/at_csv.rb:4:3: C: Style/Documentation: Missing top-level documentation comment for class User::AtCsv.
  class AtCsv
  ^^^^^^^^^^^
app/models/user/at_csv.rb:12:5: C: Metrics/AbcSize: Assignment Branch Condition size for to_csv is too high. [<10, 20, 8> 23.75/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
    def to_csv ...
    ^^^^^^^^^^
app/models/user/at_csv.rb:12:5: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for to_csv is too high. [8/7]
    def to_csv ...
    ^^^^^^^^^^
app/models/user/at_csv.rb:12:5: C: Metrics/MethodLength: Method has too many lines. [21/20] (https://rubystyle.guide#short-methods)
    def to_csv ...
    ^^^^^^^^^^
app/models/user/at_csv.rb:12:5: C: Metrics/PerceivedComplexity: Perceived complexity for to_csv is too high. [9/8]
    def to_csv ...
    ^^^^^^^^^^
app/services/api/v1/auth/jwt/authorization_service.rb:7:9: C: Style/Documentation: Missing top-level documentation comment for class Api::V1::Auth::Jwt::AuthorizationService.
        class AuthorizationService
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/api/v1/auth/jwt/authorization_service.rb:22:11: C: Metrics/AbcSize: Assignment Branch Condition size for client is too high. [<5, 19, 7> 20.86/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
          def client ...
          ^^^^^^^^^^
app/services/api/v1/auth/jwt/authorization_service.rb:22:11: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for client is too high. [8/7]
          def client ...
          ^^^^^^^^^^
app/services/api/v1/auth/jwt/json_web_token.rb:7:9: C: Style/Documentation: Missing top-level documentation comment for class Api::V1::Auth::Jwt::JsonWebToken.
        class JsonWebToken
        ^^^^^^^^^^^^^^^^^^
app/services/api/v1/contextual_error_service.rb:33:9: C: Metrics/AbcSize: Assignment Branch Condition size for contextualize is too high. [<3, 17, 5> 17.97/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
        def contextualize(errors:, context: 'DMP') ...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/api/v1/conversion_service.rb:5:5: C: Style/Documentation: Missing top-level documentation comment for class Api::V1::ConversionService.
    class ConversionService
    ^^^^^^^^^^^^^^^^^^^^^^^
app/services/api/v1/deserialization/contributor.rb:6:7: C: Style/Documentation: Missing top-level documentation comment for class Api::V1::Deserialization::Contributor.
      class Contributor
      ^^^^^^^^^^^^^^^^^
app/services/api/v1/deserialization/dataset.rb:6:7: C: Style/Documentation: Missing top-level documentation comment for class Api::V1::Deserialization::Dataset.
      class Dataset
      ^^^^^^^^^^^^^
app/services/api/v1/deserialization/funding.rb:6:7: C: Style/Documentation: Missing top-level documentation comment for class Api::V1::Deserialization::Funding.
      class Funding
      ^^^^^^^^^^^^^
app/services/api/v1/deserialization/identifier.rb:6:7: C: Style/Documentation: Missing top-level documentation comment for class Api::V1::Deserialization::Identifier.
      class Identifier
      ^^^^^^^^^^^^^^^^
app/services/api/v1/deserialization/org.rb:6:7: C: Style/Documentation: Missing top-level documentation comment for class Api::V1::Deserialization::Org.
      class Org
      ^^^^^^^^^
app/services/api/v1/deserialization/org.rb:17:11: C: Metrics/AbcSize: Assignment Branch Condition size for deserialize is too high. [<6, 17, 5> 18.71/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
          def deserialize(json: {}) ...
          ^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/api/v1/deserialization/plan.rb:6:7: C: Style/Documentation: Missing top-level documentation comment for class Api::V1::Deserialization::Plan.
      class Plan
      ^^^^^^^^^^
app/services/api/v1/deserialization/plan.rb:46:11: C: Metrics/AbcSize: Assignment Branch Condition size for deserialize is too high. [<11, 22, 4> 24.92/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
          def deserialize(json: {}) ...
          ^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/api/v1/deserialization/plan.rb:113:11: C: Metrics/AbcSize: Assignment Branch Condition size for deserialize_project is too high. [<4, 19, 5> 20.05/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
          def deserialize_project(plan:, json: {}) ...
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/api/v1/deserialization_service.rb:5:5: C: Style/Documentation: Missing top-level documentation comment for class Api::V1::DeserializationService.
    class DeserializationService
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/api/v1/deserialization_service.rb:23:9: C: Metrics/AbcSize: Assignment Branch Condition size for attach_identifier is too high. [<2, 20, 10> 22.45/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
        def attach_identifier(object:, json:) ...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/api/v1/deserialization_service.rb:23:9: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for attach_identifier is too high. [10/7]
        def attach_identifier(object:, json:) ...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/api/v1/deserialization_service.rb:23:9: C: Metrics/PerceivedComplexity: Perceived complexity for attach_identifier is too high. [10/8]
        def attach_identifier(object:, json:) ...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/api/v1/deserialization_service.rb:57:9: C: Metrics/AbcSize: Assignment Branch Condition size for app_extensions is too high. [<3, 17, 4> 17.72/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
        def app_extensions(json: {}) ...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/api/v1/json_validation_service.rb:50:9: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for validation_errors is too high. [8/7]
        def validation_errors(json:) ...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/api/v1/persistence_service.rb:8:9: C: Metrics/AbcSize: Assignment Branch Condition size for safe_save is too high. [<7, 24, 4> 25.32/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
        def safe_save(plan:) ...
        ^^^^^^^^^^^^^^^^^^^^
app/services/api/v1/persistence_service.rb:66:9: C: Metrics/AbcSize: Assignment Branch Condition size for safe_save_contributor is too high. [<3, 20, 5> 20.83/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
        def safe_save_contributor(contributor:) ...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/api/v1/persistence_service.rb:87:9: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for deduplicate_contributors is too high. [8/7]
        def deduplicate_contributors(contributors:) ...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/application_service.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for class ApplicationService.
class ApplicationService
^^^^^^^^^^^^^^^^^^^^^^^^
app/services/external_apis/base_service.rb:8:3: C: Style/Documentation: Missing top-level documentation comment for class ExternalApis::BaseService.
  class BaseService
  ^^^^^^^^^^^^^^^^^
app/services/external_apis/ror_service.rb:108:7: C: Metrics/AbcSize: Assignment Branch Condition size for process_pages is too high. [<8, 15, 9> 19.24/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
      def process_pages(term:, json:, filters: []) ...
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/external_apis/ror_service.rb:108:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for process_pages is too high. [8/7]
      def process_pages(term:, json:, filters: []) ...
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/external_apis/ror_service.rb:133:7: C: Metrics/AbcSize: Assignment Branch Condition size for parse_results is too high. [<2, 21, 5> 21.68/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
      def parse_results(json:) ...
      ^^^^^^^^^^^^^^^^^^^^^^^^
app/services/locale_service.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for class LocaleService.
class LocaleService
^^^^^^^^^^^^^^^^^^^
app/services/org/create_created_plan_service.rb:15:3: C: Style/Documentation: Missing top-level documentation comment for class Org::CreateCreatedPlanService.
  class CreateCreatedPlanService
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/org/create_exported_plan_service.rb:14:3: C: Style/Documentation: Missing top-level documentation comment for class Org::CreateExportedPlanService.
  class CreateExportedPlanService
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/org/create_joined_user_service.rb:11:3: C: Style/Documentation: Missing top-level documentation comment for class Org::CreateJoinedUserService.
  class CreateJoinedUserService
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/org/create_last_month_created_plan_service.rb:15:3: C: Style/Documentation: Missing top-level documentation comment for class Org::CreateLastMonthCreatedPlanService.
  class CreateLastMonthCreatedPlanService
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/org/create_last_month_exported_plan_service.rb:14:3: C: Style/Documentation: Missing top-level documentation comment for class Org::CreateLastMonthExportedPlanService.
  class CreateLastMonthExportedPlanService
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/org/create_last_month_joined_user_service.rb:11:3: C: Style/Documentation: Missing top-level documentation comment for class Org::CreateLastMonthJoinedUserService.
  class CreateLastMonthJoinedUserService
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/org/create_last_month_shared_plan_service.rb:13:3: C: Style/Documentation: Missing top-level documentation comment for class Org::CreateLastMonthSharedPlanService.
  class CreateLastMonthSharedPlanService
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/org/create_shared_plan_service.rb:13:3: C: Style/Documentation: Missing top-level documentation comment for class Org::CreateSharedPlanService.
  class CreateSharedPlanService
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/org/monthly_usage_service.rb:4:3: C: Style/Documentation: Missing top-level documentation comment for class Org::MonthlyUsageService.
  class MonthlyUsageService
  ^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/org/total_count_created_plan_service.rb:4:3: C: Style/Documentation: Missing top-level documentation comment for class Org::TotalCountCreatedPlanService.
  class TotalCountCreatedPlanService
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/org/total_count_joined_user_service.rb:4:3: C: Style/Documentation: Missing top-level documentation comment for class Org::TotalCountJoinedUserService.
  class TotalCountJoinedUserService
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/org/total_count_stat_service.rb:4:3: C: Style/Documentation: Missing top-level documentation comment for class Org::TotalCountStatService.
  class TotalCountStatService
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/org_selection/hash_to_org_service.rb:43:7: C: Metrics/AbcSize: Assignment Branch Condition size for to_identifiers is too high. [<9, 15, 6> 18.49/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
      def to_identifiers(hash:) ...
      ^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/org_selection/hash_to_org_service.rb:114:9: C: [Correctable] Style/RedundantArgument: Argument ' ' is redundant because it is implied by default.
        OrgSelection::SearchService.name_without_alias(name: hash[:name]) ...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/template/upgrade_customization_service.rb:62:5: C: Metrics/MethodLength: Method has too many lines. [21/20] (https://rubystyle.guide#short-methods)
    def call ...
    ^^^^^^^^
app/validators/after_validator.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for class AfterValidator.
class AfterValidator < ActiveModel::EachValidator
^^^^^^^^^^^^^^^^^^^^
app/validators/after_validator.rb:4:38: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
  DEFAULT_MESSAGE = _('must be after %{date}')
                                     ^^^^^^^
app/validators/after_validator.rb:6:3: C: Metrics/AbcSize: Assignment Branch Condition size for validate_each is too high. [<1, 19, 9> 21.05/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def validate_each(record, attribute, value) ...
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/validators/answer_for_correct_template_validator.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for class AnswerForCorrectTemplateValidator.
class AnswerForCorrectTemplateValidator < ActiveModel::Validator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/validators/email_validator.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for class EmailValidator.
class EmailValidator < ActiveModel::EachValidator
^^^^^^^^^^^^^^^^^^^^
app/validators/org_links_validator.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for class OrgLinksValidator.
class OrgLinksValidator < ActiveModel::Validator
^^^^^^^^^^^^^^^^^^^^^^^
app/validators/template_links_validator.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for class TemplateLinksValidator.
class TemplateLinksValidator < ActiveModel::Validator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/validators/template_links_validator.rb:5:3: C: Metrics/AbcSize: Assignment Branch Condition size for validate is too high. [<4, 20, 6> 21.26/17] (http://c2.com/cgi/wiki?AbcMetric, https://en.wikipedia.org/wiki/ABC_Software_Metric)
  def validate(record) ...
  ^^^^^^^^^^^^^^^^^^^^
app/validators/template_links_validator.rb:12:30: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
            msg = _('The key %{key} does not have a valid set of object links')
                             ^^^^^^
app/validators/template_links_validator.rb:16:53: C: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
          record.errors[:links] << (format(_('A key %{key} is expected for links hash'), key: k))
                                                    ^^^^^^
app/validators/url_validator.rb:3:1: C: Style/Documentation: Missing top-level documentation comment for class UrlValidator.
class UrlValidator < ActiveModel::EachValidator
^^^^^^^^^^^^^^^^^^
config.ru:4:26: C: [Correctable] Style/StringConcatenation: Prefer string interpolation to string concatenation. (https://rubystyle.guide#string-interpolation)
require File.expand_path(File.dirname(__FILE__) + '/config/environment')
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/application.rb:14:3: C: Style/Documentation: Missing top-level documentation comment for class DMPRoadmap::Application.
  class Application < Rails::Application
  ^^^^^^^^^^^^^^^^^
config/environments/production.rb:89:50: C: [Correctable] Style/GlobalStdStream: Use $stdout instead of STDOUT. (https://rubystyle.guid…
Fix views and remove any check on block length
raycarrick-ed and others added 26 commits January 28, 2022 11:12
Brake gives possible sql injection.
Not entirely sure what it's about byt guessing it's the sort_direction.
disable complexity warnings and change quotes to get rubocop happy.
renable rubocop after end of method
untethered regex allows for sql injection
spacing round ops
blank live it didn't like
Is phase should be @record
based on scan of authorize statements
user_id set. This has proved in several cases.

Fix for DCC bug https://github.com/DigitalCurationCentre/DMPonline-Service/issues/688

Change in the Plan model method owner_and_coowners() we check that each
role we currently get also has associated user that is not nil.
…DMPRoadmap/roadmap into bug_dcc_668-admin_not_able_to_see_plans
…o_see_plans

DCC Bug 668 - Fix for issue of roles in a plan that does not have a
…r pointed oout that the Plan Owner email was missing in call /api/v0/statistics/plans.

DCC issue https://github.com/DigitalCurationCentre/DMPonline-Service/issues/453

Changed app/views/api/v0/statistics/plans.json.jbuilder to include owner
of Plan. So extra fragment of json in each Plan now includes

"owner": {
        "email": "[email protected]"
      },
as in previous version of Roadmap.
…ithub.com:DMPRoadmap/roadmap into bug_dcc-453_api_not_providing_owner_email_anymore
various minor rubocop fixes
@raycarrick-ed raycarrick-ed merged commit 118ca72 into development Jan 31, 2022
@raycarrick-ed raycarrick-ed deleted the bug_dcc-453_api_not_providing_owner_email_anymore branch January 31, 2022 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants