weathermen/soundstorm

View on GitHub

Showing 5,697 of 5,698 total issues

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

  stack1 = helpers['if'].call(depth0, depth0.apiVersion, {hash:{},inverse:self.noop,fn:self.program(8, program8, data),data:data});
Severity: Major
Found in docs/api/swagger-ui/swagger-ui.js and 6 other locations - About 1 hr to fix
docs/api/swagger-ui/swagger-ui.js on lines 296..296
docs/api/swagger-ui/swagger-ui.js on lines 455..455
docs/api/swagger-ui/swagger-ui.js on lines 458..458
docs/api/swagger-ui/swagger-ui.js on lines 461..461
docs/api/swagger-ui/swagger-ui.js on lines 464..464
docs/api/swagger-ui/swagger-ui.js on lines 690..690

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

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 urlify has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    SwaggerOperation.prototype.urlify = function(args) {
      var param, queryParams, reg, url, _i, _j, _len, _len1, _ref, _ref1;
      url = this.resource.basePath + this.pathJson();
      _ref = this.parameters;
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
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

    Content.registerProcessor(
      ["application/json; charset=utf-8","application/json","json"],
      {
        parser: function(string) {
          return JSON.parse(string);
    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 2088..2095

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

    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

    Content.registerProcessor(
      ["application/json; charset=utf-8","application/json","json"],
      {
        parser: function(string) {
          return JSON.parse(string);
    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 166..173

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

    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 Logger has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var Logger = function(options) {
      var logger = this;
      var options = options||{};
    
      // Default options
    Severity: Minor
    Found in docs/api/swagger-ui/lib/shred.bundle.js - About 1 hr to fix

      Function setCookie has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            this.setCookie = function setCookie(cookie) {
              cookie = Cookie(cookie);
              //Delete the cookie if the set is past the current time
              var remove = cookie.expiration_date <= Date.now();
              if(cookie.name in cookies) {
      Severity: Minor
      Found in docs/api/swagger-ui/lib/shred.bundle.js - About 1 hr to fix

        Function addListener has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        EventEmitter.prototype.addListener = function(type, listener) {
          if ('function' !== typeof listener) {
            throw new Error('addListener only takes instances of Function');
          }
        
        
        Severity: Minor
        Found in docs/api/swagger-ui/lib/shred.bundle.js - About 1 hr to fix

          Function showStatus has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              OperationView.prototype.showStatus = function(data) {
                var code, content, contentType, headers, pre, response_body;
                content = data.content.data;
                headers = data.getHeaders();
                contentType = headers["Content-Type"];
          Severity: Minor
          Found in docs/api/swagger-ui/swagger-ui.js - About 1 hr to fix

            Function _raw has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              request._raw = http.request(reqParams, function(response) {
                request.log.debug("Received response ..");
            
                // We haven't timed out and we have a response, so make sure we clear the
                // timeout so it doesn't fire while we're processing the response.
            Severity: Minor
            Found in docs/api/swagger-ui/lib/shred.bundle.js - About 1 hr to fix

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

                length: {
                  get: function() {
                    if (typeof Buffer !== 'undefined') {
                      return Buffer.byteLength(this.body);
                    }
              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 2047..2054

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

              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

                length: {
                  get: function() {
                    if (typeof Buffer !== 'undefined') {
                      return Buffer.byteLength(this.body);
                    }
              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 125..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 58.

              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 compile has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                compile: function(environment, options, context, asObject) {
                  this.environment = environment;
                  this.options = options || {};
              
                  Handlebars.log(Handlebars.logger.DEBUG, this.environment.disassemble() + "\n\n");
              Severity: Minor
              Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js - About 1 hr to fix

                Function replaceStack has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  replaceStack: function(callback) {
                    var prefix = '',
                        inline = this.isInline(),
                        stack;
                
                
                Severity: Minor
                Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js - About 1 hr to fix

                  Function SwaggerModelProperty has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function SwaggerModelProperty(name, obj) {
                        this.name = name;
                        this.dataType = obj.type || obj.dataType || obj["$ref"];
                        this.isCollection = this.dataType && (this.dataType.toLowerCase() === 'array' || this.dataType.toLowerCase() === 'list' || this.dataType.toLowerCase() === 'set');
                        this.descr = obj.description;
                  Severity: Minor
                  Found in docs/api/swagger-ui/lib/swagger.js - About 1 hr to fix

                    Function exports has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var Request = module.exports = function (xhr, params) {
                        var self = this;
                        self.xhr = xhr;
                        self.body = '';
                        
                    Severity: Minor
                    Found in docs/api/swagger-ui/lib/shred.bundle.js - About 1 hr to fix

                      Function initialize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          SwaggerUi.prototype.initialize = function(options) {
                            var _this = this;
                            if (options == null) {
                              options = {};
                            }
                      Severity: Minor
                      Found in docs/api/swagger-ui/swagger-ui.js - About 1 hr to fix

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

                          if (input == null || (typeof input !== 'string' && input.constructor !== Handlebars.AST.ProgramNode)) {
                            throw new Handlebars.Exception("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input);
                          }
                        Severity: Major
                        Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js and 1 other location - About 1 hr to fix
                        docs/api/swagger-ui/lib/handlebars-1.0.0.js on lines 2151..2153

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

                        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 (input == null || (typeof input !== 'string' && input.constructor !== Handlebars.AST.ProgramNode)) {
                            throw new Handlebars.Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + input);
                          }
                        Severity: Major
                        Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js and 1 other location - About 1 hr to fix
                        docs/api/swagger-ui/lib/handlebars-1.0.0.js on lines 2137..2139

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

                        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 parseHeaders has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function parseHeaders (xhr) {
                            var lines = xhr.getAllResponseHeaders().split(/\r?\n/);
                            var headers = {};
                            for (var i = 0; i < lines.length; i++) {
                                var line = lines[i];
                        Severity: Minor
                        Found in docs/api/swagger-ui/lib/shred.bundle.js - About 1 hr to fix

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

                          require.define = function (filename, fn) {
                              var dirname = require._core[filename]
                                  ? ''
                                  : require.modules.path().dirname(filename)
                              ;
                          Severity: Minor
                          Found in docs/api/swagger-ui/lib/shred.bundle.js - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language