ncbo/bioportal_web_ui

View on GitHub

Showing 628 of 628 total issues

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

  window.search = function (term) {
    console.time('search')
    idx.search(term)
    console.timeEnd('search')
  }
Severity: Minor
Found in public/browse/lib/lunr.js/example/app.js and 1 other location - About 45 mins to fix
public/browse/lib/lunr.js/example/app.js on lines 23..27

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

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

  window.profile = function (term) {
    console.profile('search')
    idx.search(term)
    console.profileEnd('search')
  }
Severity: Minor
Found in public/browse/lib/lunr.js/example/app.js and 1 other location - About 45 mins to fix
public/browse/lib/lunr.js/example/app.js on lines 29..33

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

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

lunr.TokenStore = function () {
  this.root = { docs: {} }
  this.length = 0
}
Severity: Minor
Found in public/browse/lib/lunr.js/lib/token_store.js and 1 other location - About 45 mins to fix
public/browse/lib/lunr.js/lunr.js on lines 1673..1676

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

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

lunr.stopWordFilter = function (token) {
  if (lunr.stopWordFilter.stopWords.indexOf(token) === -1) return token
}
Severity: Minor
Found in public/browse/lib/lunr.js/lunr.js and 1 other location - About 40 mins to fix
public/browse/lib/lunr.js/lib/stop_word_filter.js on lines 18..20

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

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

lunr.stopWordFilter = function (token) {
  if (lunr.stopWordFilter.stopWords.indexOf(token) === -1) return token
}
Severity: Minor
Found in public/browse/lib/lunr.js/lib/stop_word_filter.js and 1 other location - About 40 mins to fix
public/browse/lib/lunr.js/lunr.js on lines 1505..1507

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

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

lunr.TokenStore.prototype.get = function (token, root) {
  return this.getNode(token, root).docs || {}
}
Severity: Minor
Found in public/browse/lib/lunr.js/lib/token_store.js and 1 other location - About 40 mins to fix
public/browse/lib/lunr.js/lunr.js on lines 1784..1786

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

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

lunr.TokenStore.prototype.get = function (token, root) {
  return this.getNode(token, root).docs || {}
}
Severity: Minor
Found in public/browse/lib/lunr.js/lunr.js and 1 other location - About 40 mins to fix
public/browse/lib/lunr.js/lib/token_store.js on lines 124..126

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

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

Consider simplifying this complex logical expression.
Open

    if (masterConfig.env === 'node' || (!masterConfig.env &&
            typeof process !== "undefined" &&
            process.versions &&
            !!process.versions.node &&
            !process.versions['node-webkit'])) {
Severity: Major
Found in public/browse/lib/lunr.js/example/text.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

    if (window.jasmine || window.mocha) {
    
      var currentSpec = null,
          isSpecRunning = function() {
            return !!currentSpec;
    Severity: Major
    Found in public/browse/lib/angular-mocks/angular-mocks.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

          if @ontology.flat?
      
            ignore_concept_param = params[:conceptid].nil? ||
                params[:conceptid].empty? ||
                params[:conceptid].eql?("root") ||
      Severity: Major
      Found in app/controllers/application_controller.rb - About 40 mins to fix

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

        lunr.TokenStore.prototype.toJSON = function () {
          return {
            root: this.root,
            length: this.length
          }
        Severity: Minor
        Found in public/browse/lib/lunr.js/lib/token_store.js and 1 other location - About 40 mins to fix
        public/browse/lib/lunr.js/lib/document_store.js on lines 90..95

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

        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

        lunr.Store.prototype.toJSON = function () {
          return {
            store: this.store,
            length: this.length
          }
        Severity: Minor
        Found in public/browse/lib/lunr.js/lib/document_store.js and 1 other location - About 40 mins to fix
        public/browse/lib/lunr.js/lib/token_store.js on lines 187..192

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

        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

        Function animateRun has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

              function animateRun(animationEvent, element, className, activeAnimationComplete, styles) {
        Severity: Minor
        Found in public/browse/lib/angular-animate/angular-animate.js - About 35 mins to fix

          Function animateAfter has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                function animateAfter(animationEvent, element, className, afterAnimationComplete, styles) {
          Severity: Minor
          Found in public/browse/lib/angular-animate/angular-animate.js - About 35 mins to fix

            Function setClass has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    setClass: function(element, add, remove, animationCompleted, options) {
            Severity: Minor
            Found in public/browse/lib/angular-animate/angular-animate.js - About 35 mins to fix

              Function writeFile has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      writeFile: function (pluginName, moduleName, req, write, config) {
              Severity: Minor
              Found in public/browse/lib/lunr.js/example/text.js - About 35 mins to fix

                Function animate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        animate: function(element, from, to, className, options) {
                Severity: Minor
                Found in public/browse/lib/angular-animate/angular-animate.js - About 35 mins to fix

                  Function animate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                        function animate(animationEvent, element, className, animationComplete, options) {
                  Severity: Minor
                  Found in public/browse/lib/angular-animate/angular-animate.js - About 35 mins to fix

                    Function link has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        link: function(scope, $element, attr, ctrl, $transclude) {
                    Severity: Minor
                    Found in public/browse/lib/angular-route/angular-route.js - About 35 mins to fix

                      Function beforeSetClass has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              beforeSetClass: function(element, add, remove, animationCompleted, options) {
                      Severity: Minor
                      Found in public/browse/lib/angular-animate/angular-animate.js - About 35 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language