SysMO-DB/seek

View on GitHub

Showing 1,025 of 1,025 total issues

Avoid too many return statements within this method.
Open

        return downloadable ? I18n.t('access.editing_downloadable') : I18n.t('access.editing')
Severity: Major
Found in app/models/policy.rb - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            return "Invalid access type"
    Severity: Major
    Found in app/models/policy.rb - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return I18n.t('access.managing')
      Severity: Major
      Found in app/models/policy.rb - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return false
        Severity: Major
        Found in app/models/user.rb - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                    return false
          Severity: Major
          Found in app/models/user.rb - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                        return false unless process_from_url(item_params)
            Severity: Major
            Found in lib/seek/upload_handling/data_upload.rb - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                          return false unless process_upload(item_params)
              Severity: Major
              Found in lib/seek/upload_handling/data_upload.rb - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                          return false unless check_for_valid_scheme(item_params)
                Severity: Major
                Found in lib/seek/upload_handling/data_upload.rb - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                              return false
                  Severity: Major
                  Found in lib/seek/permissions/authorization.rb - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                return access_type >= Policy::MANAGING
                    Severity: Major
                    Found in lib/seek/permissions/authorization.rb - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                  return false
                      Severity: Major
                      Found in lib/explicit_versioning.rb - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                      return true
                        Severity: Major
                        Found in lib/explicit_versioning.rb - About 30 mins to fix

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

                              $j('div.active_sheet').scrollLeft(cell.position().left + $j('div.active_sheet').scrollLeft() - 500);
                          Severity: Minor
                          Found in app/assets/javascripts/spreadsheet_explorer.js and 1 other location - About 30 mins to fix
                          app/assets/javascripts/spreadsheet_explorer.js on lines 496..496

                          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 45.

                          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

                                  if (!/item1-active/.test(parent.className)) {
                                      parent.className = parent.className.replace(/item1/, "item1-active");
                                  }
                          Severity: Minor
                          Found in app/assets/javascripts/dropMenu.js and 1 other location - About 30 mins to fix
                          app/assets/javascripts/dropMenu.js on lines 203..205

                          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 45.

                          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

                                  if (typeof cnt != "undefined") {
                                      if (cnt != this.sectionsHideCnt[this.sections.indexOf(id)]) { return; }
                                  }
                          Severity: Minor
                          Found in app/assets/javascripts/dropMenu.js and 1 other location - About 30 mins to fix
                          app/assets/javascripts/dropMenu.js on lines 218..220

                          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 45.

                          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

                                  if (!/item1-active/.test(el.className)) {
                                      el.className = el.className.replace(/item1/, "item1-active");
                                  }
                          Severity: Minor
                          Found in app/assets/javascripts/dropMenu.js and 1 other location - About 30 mins to fix
                          app/assets/javascripts/dropMenu.js on lines 224..226

                          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 45.

                          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

                              $j('div.active_sheet').scrollTop(row.position().top + $j('div.active_sheet').scrollTop() - 500);
                          Severity: Minor
                          Found in app/assets/javascripts/spreadsheet_explorer.js and 1 other location - About 30 mins to fix
                          app/assets/javascripts/spreadsheet_explorer.js on lines 497..497

                          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 45.

                          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

                                  if (typeof cnt != "undefined") {
                                      if (cnt != this.sectionsShowCnt[this.sections.indexOf(id)]) { return; }
                                  }
                          Severity: Minor
                          Found in app/assets/javascripts/dropMenu.js and 1 other location - About 30 mins to fix
                          app/assets/javascripts/dropMenu.js on lines 240..242

                          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 45.

                          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

                                data_file = DataFile.find(params[:data_file_id])
                                if data_file.can_edit? current_user
                                  @data_file = data_file
                                  find_display_asset @data_file
                                else
                          Severity: Minor
                          Found in app/controllers/studied_factors_controller.rb and 1 other location - About 30 mins to fix
                          app/controllers/experimental_conditions_controller.rb on lines 134..143

                          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 32.

                          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

                              def find_template_sheet doc
                                #sheet = doc.find_first("//ss:sheet[@name='IDF']")
                                #sheet = doc.find_first("//ss:sheet[@name='idf']") if sheet.nil?
                                #sheet = doc.find_first("//ss:sheet[@name='Idf']") if sheet.nil?
                                #sheet = hunt_for_sheet(doc, "IDF") if sheet.nil?
                          Severity: Minor
                          Found in lib/seek/data/bio_samples.rb and 1 other location - About 30 mins to fix
                          lib/seek/data/bio_samples.rb on lines 158..172

                          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 32.

                          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

                          Severity
                          Category
                          Status
                          Source
                          Language