weathermen/soundstorm

View on GitHub

Showing 91 of 5,698 total issues

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

    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

      Avoid deeply nested control flow statements.
      Open

                  if (!arg.hasOwnProperty(match[2][k])) {
                    throw(sprintf('[sprintf] property "%s" does not exist', match[2][k]));
                  }
      Severity: Major
      Found in docs/api/swagger-ui/lib/shred.bundle.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if (this.terminals_[p] && p > 2) {
                                expected.push("'" + this.terminals_[p] + "'");
                            }
        Severity: Major
        Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                      while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {
                        if ((field_match = /^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) {
                          field_list.push(field_match[1]);
                        }
                        else if ((field_match = /^\[(\d+)\]/.exec(replacement_field)) !== null) {
          Severity: Major
          Found in docs/api/swagger-ui/lib/shred.bundle.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                          if(remove) {
                            cookies_list.splice(i,1);
                            if(cookies_list.length===0) {
                              delete cookies[cookie.name]
                            }
            Severity: Major
            Found in docs/api/swagger-ui/lib/shred.bundle.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                        if(data) { data.key = key; }
              Severity: Major
              Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if (m) return m;
                Severity: Major
                Found in docs/api/swagger-ui/lib/shred.bundle.js - About 45 mins to fix

                  Function invokePartial has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    invokePartial: function(partial, name, context, helpers, partials, data) {
                  Severity: Minor
                  Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                  if ((parameter.defaultValue != null) && parameter.defaultValue === v) {
                                    parameter.allowableValues.descriptiveValues.push({
                                      value: v,
                                      isDefault: true
                                    });
                    Severity: Major
                    Found in docs/api/swagger-ui/lib/swagger.js - About 45 mins to fix

                      Function alias has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                      require.alias = function (from, to) {
                          var path = require.modules.path();
                          var res = null;
                          try {
                              res = require.resolve(from + '/package.json', '/');
                      Severity: Minor
                      Found in docs/api/swagger-ui/lib/shred.bundle.js - About 45 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 get has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          get: function() {
                            if (this._type) {
                              return this._type;
                            } else {
                              if (this._data) {
                      Severity: Minor
                      Found in docs/api/swagger-ui/lib/shred/content.js - About 35 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

                      Method validate_each has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                        def validate_each(record, attribute, value)
                          return if options[:allow_blank] && record[attribute].blank?
                      
                          unless value.attached? && value.content_type.in?(content_types)
                            value.purge if record.new_record? # Only purge the offending blob if the record is new
                      Severity: Minor
                      Found in app/validators/content_type_validator.rb - About 35 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

                      Avoid too many return statements within this function.
                      Open

                              return false;
                      Severity: Major
                      Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                        case 13: yy_.yytext = yy_.yytext.substr(3,yy_.yyleng-5); this.popState(); return 15; 
                        Severity: Major
                        Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              return true;
                          Severity: Major
                          Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                              return true;
                            Severity: Major
                            Found in docs/api/swagger-ui/lib/shred.bundle.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                              case 20: this.popState(); return 24; 
                              Severity: Major
                              Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                case 22: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"'); return 31; 
                                Severity: Major
                                Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                              return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
                                                      {text: "", token: null, line: this.yylineno});
                                  Severity: Major
                                  Found in docs/api/swagger-ui/lib/handlebars-1.0.0.js - About 30 mins to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language