MiraitSystems/enju_trunk

View on GitHub

Showing 1,155 of 1,155 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        if self.aggregation_type == "month"
          months.each do |month|
            person = second_checkouts.select("checkouts.user_id").where("checked_at >= ? and checked_at <= ?", month[:from_date], month[:to_date]).reorder(:user_id).uniq
            persons << person.length
          end
Severity: Major
Found in app/models/checkout_statistics.rb and 1 other location - About 1 hr to fix
app/models/checkout_statistics.rb on lines 136..146

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

  def update
    @budget_type = BudgetType.find(params[:id])

    respond_to do |format|
      if @budget_type.update_attributes(params[:budget_type])
Severity: Major
Found in app/controllers/budget_types_controller.rb and 3 other locations - About 1 hr to fix
app/controllers/areas_controller.rb on lines 46..55
app/controllers/copy_requests_controller.rb on lines 35..45
app/controllers/terms_controller.rb on lines 32..42

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      manifestation.picture_files.each_with_index do |picture_file, i|
        if i == 0
          link += link_to(show_image(picture_file, :size => :thumb),
            picture_file_path(picture_file, :format => picture_file.extname), :rel => "manifestation_#{manifestation.id}")
        else
Severity: Major
Found in app/helpers/opac_helper.rb and 1 other location - About 1 hr to fix
app/helpers/agents_helper.rb on lines 5..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

  def update
    @area = Area.find(params[:id])
    respond_to do |format|
      if @area.update_attributes(params[:area])
        flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.area'))
Severity: Major
Found in app/controllers/areas_controller.rb and 3 other locations - About 1 hr to fix
app/controllers/budget_types_controller.rb on lines 32..42
app/controllers/copy_requests_controller.rb on lines 35..45
app/controllers/terms_controller.rb on lines 32..42

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        if self.aggregation_type == "month"
          months.each do |month|
            book = second_checkouts.select("checkouts.id").where("checked_at >= ? and checked_at <= ?", month[:from_date], month[:to_date]).reorder("checkouts.id").uniq
            books << book.length
          end
Severity: Major
Found in app/models/checkout_statistics.rb and 1 other location - About 1 hr to fix
app/models/checkout_statistics.rb on lines 122..132

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

  def update
    @copy_request = CopyRequest.find(params[:id])

    respond_to do |format|
      if @copy_request.update_attributes(params[:copy_request])
Severity: Major
Found in app/controllers/copy_requests_controller.rb and 3 other locations - About 1 hr to fix
app/controllers/areas_controller.rb on lines 46..55
app/controllers/budget_types_controller.rb on lines 32..42
app/controllers/terms_controller.rb on lines 32..42

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 55.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Method read_wrong_sheet has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def self.read_wrong_sheet(extraparams, options = { sheet: nil, default_style: nil, data: nil })
    oo = Excelx.new(eval(extraparams)['filename'])
    sheet_name = eval(extraparams)['sheet'] rescue nil
    oo.default_sheet = sheet_name
    begin
Severity: Minor
Found in app/models/resource_import_textresult.rb - About 1 hr to fix

    Method output_userlist_pdf has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def self.output_userlist_pdf(users)
        report = EnjuTrunk.new_report('userlist.tlf')
    
        # set page_num
        report.events.on :page_create do |e|
    Severity: Minor
    Found in app/models/user.rb - About 1 hr to fix

      Method index has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def index
      
          @count = {}
          page = params[:page] || 1
          per_page = params[:format] == 'tsv' ? 65534 : ExchangeRate.default_per_page
      Severity: Minor
      Found in app/controllers/exchange_rates_controller.rb - About 1 hr to fix

        Method translation_for_output_columns has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              def translation_for_output_columns
                translation = {}
                column_spec = {}
                initialize_output_column_spec(column_spec, true)
        
        
        Severity: Minor
        Found in lib/enju_trunk/output_columns.rb - About 1 hr to fix

          Similar blocks of code found in 5 locations. Consider refactoring.
          Open

            def library_facet(library, current_libraries, facet)
              string = ''
              current = true if current_libraries.include?(library.name)
              string << "<strong>" if current
              string << link_to("#{library.display_name.localize} (" + facet.count.to_s + ")", url_for(params.merge(:page => nil, :library => (current_libraries << library.name).uniq.join(' '), :view => nil)))
          Severity: Major
          Found in app/helpers/manifestations_helper.rb and 4 other locations - About 1 hr to fix
          app/helpers/shelves_helper.rb on lines 15..21
          app/helpers/users_helper.rb on lines 52..58
          app/helpers/users_helper.rb on lines 61..67
          app/helpers/users_helper.rb on lines 70..76

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 54.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 5 locations. Consider refactoring.
          Open

            def role_facet(role, current_roles, facet)
              string = ''
              current = true if current_roles.include?(role.name)
              string << "<strong>" if current
              string << link_to("#{role.display_name.localize} (" + facet.count.to_s + ")", url_for(params.merge(:page => nil, :role => (current_roles << role.name).uniq.join(' '), :view => nil)))
          Severity: Major
          Found in app/helpers/users_helper.rb and 4 other locations - About 1 hr to fix
          app/helpers/manifestations_helper.rb on lines 144..150
          app/helpers/shelves_helper.rb on lines 15..21
          app/helpers/users_helper.rb on lines 52..58
          app/helpers/users_helper.rb on lines 70..76

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 54.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 4 locations. Consider refactoring.
          Open

            def show
              CheckoutStatHasUser.per_page = 65534 if params[:format] == 'csv' or params[:format] == 'tsv'
              @stats = @user_checkout_stat.checkout_stat_has_users.order('checkouts_count DESC, user_id').page(params[:page])
          
              respond_to do |format|
          Severity: Major
          Found in app/controllers/user_checkout_stats_controller.rb and 3 other locations - About 1 hr to fix
          app/controllers/manifestation_checkout_stats_controller.rb on lines 18..26
          app/controllers/manifestation_reserve_stats_controller.rb on lines 18..26
          app/controllers/user_reserve_stats_controller.rb on lines 18..26

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 54.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 4 locations. Consider refactoring.
          Open

            def show
              ReserveStatHasUser.per_page = 65534 if params[:format] == 'csv' or params[:format] == 'tsv'
              @stats = @user_reserve_stat.reserve_stat_has_users.order('reserves_count DESC, user_id').page(params[:page])
          
              respond_to do |format|
          Severity: Major
          Found in app/controllers/user_reserve_stats_controller.rb and 3 other locations - About 1 hr to fix
          app/controllers/manifestation_checkout_stats_controller.rb on lines 18..26
          app/controllers/manifestation_reserve_stats_controller.rb on lines 18..26
          app/controllers/user_checkout_stats_controller.rb on lines 18..26

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 54.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 5 locations. Consider refactoring.
          Open

            def library_facet(library, current_libraries, facet)
              string = ''
              current = true if current_libraries.include?(library.name)
              string << "<strong>" if current
              string << link_to("#{library.display_name.localize} (" + facet.count.to_s + ")", url_for(params.merge(:page => nil, :library => (current_libraries << library.name).uniq.join(' '), :view => nil)))
          Severity: Major
          Found in app/helpers/users_helper.rb and 4 other locations - About 1 hr to fix
          app/helpers/manifestations_helper.rb on lines 144..150
          app/helpers/shelves_helper.rb on lines 15..21
          app/helpers/users_helper.rb on lines 61..67
          app/helpers/users_helper.rb on lines 70..76

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 54.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 5 locations. Consider refactoring.
          Open

            def user_status_facet(user_status, current_user_statuses, facet)
              string = ''
              current = true if current_user_statuses.include?(user_status.name)
              string << "<strong>" if current
              string << link_to("#{user_status.display_name.localize} (" + facet.count.to_s + ")", url_for(params.merge(:page => nil, :user_status => (current_user_statuses << user_status.name).uniq.join(' '), :view => nil)))
          Severity: Major
          Found in app/helpers/users_helper.rb and 4 other locations - About 1 hr to fix
          app/helpers/manifestations_helper.rb on lines 144..150
          app/helpers/shelves_helper.rb on lines 15..21
          app/helpers/users_helper.rb on lines 52..58
          app/helpers/users_helper.rb on lines 61..67

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 54.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 5 locations. Consider refactoring.
          Open

            def library_facet(library, current_libraries, facet)
              string = ''
              current = true if current_libraries.include?(library.name)
              string << "<strong>" if current
              string << link_to("#{library.display_name.localize} (" + facet.count.to_s + ")", url_for(params.merge(:page => nil, :library => (current_libraries << library.name).uniq.join(' '), :view => nil)))
          Severity: Major
          Found in app/helpers/shelves_helper.rb and 4 other locations - About 1 hr to fix
          app/helpers/manifestations_helper.rb on lines 144..150
          app/helpers/users_helper.rb on lines 52..58
          app/helpers/users_helper.rb on lines 61..67
          app/helpers/users_helper.rb on lines 70..76

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 54.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 4 locations. Consider refactoring.
          Open

            def show
              ReserveStatHasManifestation.per_page = 65534 if params[:format] == 'csv' or params[:format] == 'tsv'
              @stats = @manifestation_reserve_stat.reserve_stat_has_manifestations.order('reserves_count DESC, manifestation_id').page(params[:page])
          
              respond_to do |format|
          Severity: Major
          Found in app/controllers/manifestation_reserve_stats_controller.rb and 3 other locations - About 1 hr to fix
          app/controllers/manifestation_checkout_stats_controller.rb on lines 18..26
          app/controllers/user_checkout_stats_controller.rb on lines 18..26
          app/controllers/user_reserve_stats_controller.rb on lines 18..26

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 54.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 4 locations. Consider refactoring.
          Open

            def show
              CheckoutStatHasManifestation.per_page = 65534 if params[:format] == 'csv' or params[:format] == 'tsv'
              @stats = @manifestation_checkout_stat.checkout_stat_has_manifestations.order('checkouts_count DESC, manifestation_id').page(params[:page])
          
              respond_to do |format|
          Severity: Major
          Found in app/controllers/manifestation_checkout_stats_controller.rb and 3 other locations - About 1 hr to fix
          app/controllers/manifestation_reserve_stats_controller.rb on lines 18..26
          app/controllers/user_checkout_stats_controller.rb on lines 18..26
          app/controllers/user_reserve_stats_controller.rb on lines 18..26

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 54.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Method get_resource_import_results_tsv has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def self.get_resource_import_results_tsv(resource_import_results)
              data = String.new
              data << "\xEF\xBB\xBF".force_encoding("UTF-8") + "\n"
              columns = [
                [:title, 'activerecord.attributes.manifestation.original_title'],
          Severity: Minor
          Found in app/models/resource_import_result.rb - About 1 hr to fix
            Severity
            Category
            Status
            Source
            Language