weathermen/soundstorm

View on GitHub

Showing 5,697 of 5,698 total issues

Function equals has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  equals: function(other) {
    var len = this.opcodes.length;
    if (other.opcodes.length !== len) {
      return false;
    }
Severity: Minor
Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js - About 1 hr to fix

    Function block has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      block: function(block) {
        var mustache = block.mustache,
            program = block.program,
            inverse = block.inverse;
    
    
    Severity: Minor
    Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js - About 1 hr to fix

      Function SwaggerHttp has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function SwaggerHttp() {
            var identity, toString,
              _this = this;
            if (typeof window !== 'undefined') {
              this.Shred = require("./shred");
      Severity: Minor
      Found in docs/api/swagger-ui/lib/swagger.js - About 1 hr to fix

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

        var Errors = {
          setDataWithBody: function(object) {
            throw new Error("Attempt to set data attribute of a content object " +
                "when the body attributes was already set.");
          },
        Severity: Major
        Found in docs/api/swagger-ui/lib/shred.bundle.js and 1 other location - About 1 hr to fix
        docs/api/swagger-ui/lib/shred/content.js on lines 183..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 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

        Function SwaggerRequest has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            function SwaggerRequest(type, url, params, opts, successCallback, errorCallback, operation, execution) {
        Severity: Major
        Found in docs/api/swagger-ui/lib/swagger.js - About 1 hr to fix

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

          var Errors = {
            setDataWithBody: function(object) {
              throw new Error("Attempt to set data attribute of a content object " +
                  "when the body attributes was already set.");
            },
          Severity: Major
          Found in docs/api/swagger-ui/lib/shred/content.js and 1 other location - About 1 hr to fix
          docs/api/swagger-ui/lib/shred.bundle.js on lines 2099..2108

          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

                if (isParam) {
                  parameterContentTypeView = new ParameterContentTypeView({
                    model: contentTypeModel
                  });
                  $('.parameter-content-type', $(this.el)).append(parameterContentTypeView.render().el);
          Severity: Major
          Found in docs/api/swagger-ui/swagger-ui.js and 1 other location - About 1 hr to fix
          docs/api/swagger-ui/swagger-ui.js on lines 1859..1864

          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

                } else {
                  responseContentTypeView = new ResponseContentTypeView({
                    model: contentTypeModel
                  });
                  $('.response-content-type', $(this.el)).append(responseContentTypeView.render().el);
          Severity: Major
          Found in docs/api/swagger-ui/swagger-ui.js and 1 other location - About 1 hr to fix
          docs/api/swagger-ui/swagger-ui.js on lines 1854..1859

          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 3 locations. Consider refactoring.
          Open

                for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
                  resource = _ref3[_i];
                  this.addResource(resource);
                }
          Severity: Major
          Found in docs/api/swagger-ui/swagger-ui.js and 2 other locations - About 55 mins to fix
          docs/api/swagger-ui/swagger-ui.js on lines 1452..1455
          docs/api/swagger-ui/swagger-ui.js on lines 1539..1542

          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 3 locations. Consider refactoring.
          Open

                for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
                  operation = _ref4[_i];
                  this.addOperation(operation);
                }
          Severity: Major
          Found in docs/api/swagger-ui/swagger-ui.js and 2 other locations - About 55 mins to fix
          docs/api/swagger-ui/swagger-ui.js on lines 1410..1413
          docs/api/swagger-ui/swagger-ui.js on lines 1539..1542

          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 3 locations. Consider refactoring.
          Open

                for (_k = 0, _len2 = _ref7.length; _k < _len2; _k++) {
                  statusCode = _ref7[_k];
                  this.addStatusCode(statusCode);
                }
          Severity: Major
          Found in docs/api/swagger-ui/swagger-ui.js and 2 other locations - About 55 mins to fix
          docs/api/swagger-ui/swagger-ui.js on lines 1410..1413
          docs/api/swagger-ui/swagger-ui.js on lines 1452..1455

          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 2 locations. Consider refactoring.
          Open

            def create
              @user = User.find_by!(name: params[:user_id])
          
              if current_user.follow!(@user)
                flash[:notice] = t('.success', user: @user.name)
          Severity: Minor
          Found in app/controllers/follows_controller.rb and 1 other location - About 55 mins to fix
          app/controllers/follows_controller.rb on lines 33..44

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

          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 destroy
              @user = User.find_by!(name: params[:user_id])
          
              if current_user.unfollow!(@user)
                flash[:notice] = t('.success', user: @user.name)
          Severity: Minor
          Found in app/controllers/follows_controller.rb and 1 other location - About 55 mins to fix
          app/controllers/follows_controller.rb on lines 13..24

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

          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 flatten_hash has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

            def flatten_hash(hash, results = {}, parent_key = '')
              return results unless hash.kind_of?(Hash)
          
              hash.keys.each do |key|
                current_key = parent_key.blank? ? key : "#{parent_key}.#{key}"
          Severity: Minor
          Found in app/models/translation/collection.rb - About 55 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function performAction has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
          Severity: Major
          Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js - About 50 mins to fix

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

                    $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() {
                        Docs.collapseOperation($(this));
                    });
            Severity: Minor
            Found in docs/api/swagger-ui/swagger-ui.js and 1 other location - About 50 mins to fix
            docs/api/swagger-ui/swagger-ui.js on lines 158..160

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

            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

                    $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() {
                        Docs.expandOperation($(this));
                    });
            Severity: Minor
            Found in docs/api/swagger-ui/swagger-ui.js and 1 other location - About 50 mins to fix
            docs/api/swagger-ui/swagger-ui.js on lines 167..169

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

            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(!this.depths[depth]) {
                  this.depths[depth] = true;
                  this.depths.list.push(depth);
                }
            Severity: Minor
            Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js and 1 other location - About 50 mins to fix
            docs/api/swagger-ui/lib/handlebars-1.0.0.js on lines 1905..1908

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

            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(!this.registers[name]) {
                  this.registers[name] = true;
                  this.registers.list.push(name);
                }
            Severity: Minor
            Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js and 1 other location - About 50 mins to fix
            docs/api/swagger-ui/lib/handlebars-1.0.0.js on lines 1220..1223

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

            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

            Avoid deeply nested control flow statements.
            Open

                          if (type.toLowerCase() === "file") {
                            _results.push(param);
                          }
            Severity: Major
            Found in docs/api/swagger-ui/lib/swagger.js - About 45 mins to fix
              Severity
              Category
              Status
              Source
              Language