Aigeruth/docker-private-registry

View on GitHub

Showing 66 of 66 total issues

Function SwaggerResource has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var SwaggerResource = function(resourceObj, api) {
  var _this = this;
  this.api = api;
  this.api = this.api;
  consumes = (this.consumes | []);
Severity: Minor
Found in public/js/lib/swagger.js - About 2 hrs to fix

    Function onOAuthComplete has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function onOAuthComplete(token) {
      if(token) {
        if(token.error) {
          var checkbox = $('input[type=checkbox],.secured')
          checkbox.each(function(pos){
    Severity: Minor
    Found in public/js/lib/swagger-oauth.js - About 1 hr to fix

      Function buildFromSpec has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      SwaggerApi.prototype.buildFromSpec = function(response) {
        if (response.apiVersion != null) {
          this.apiVersion = response.apiVersion;
        }
        this.apis = {};
      Severity: Minor
      Found in public/js/lib/swagger.js - About 1 hr to fix

        Function buildFromSpec has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

        SwaggerApi.prototype.buildFromSpec = function(response) {
          if (response.apiVersion != null) {
            this.apiVersion = response.apiVersion;
          }
          this.apis = {};
        Severity: Minor
        Found in public/js/lib/swagger.js - About 1 hr 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 buildFrom1_1Spec has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        SwaggerApi.prototype.buildFrom1_1Spec = function(response) {
          log("This API is using a deprecated version of Swagger!  Please see http://github.com/wordnik/swagger-core/wiki for more info");
          if (response.apiVersion != null)
            this.apiVersion = response.apiVersion;
          this.apis = {};
        Severity: Minor
        Found in public/js/lib/swagger.js - About 1 hr to fix

          Function addOperations has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          SwaggerResource.prototype.addOperations = function(resource_path, ops, consumes, produces) {
            if (ops) {
              output = [];
              for (var i = 0; i < ops.length; i++) {
                o = ops[i];
          Severity: Minor
          Found in public/js/lib/swagger.js - About 1 hr to fix

            Function execute has 44 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            ShredHttpClient.prototype.execute = function(obj) {
              if(!this.isInitialized)
                this.initShred();
            
              var cb = obj.on, res;
            Severity: Minor
            Found in public/js/lib/swagger.js - About 1 hr to fix

              Function SwaggerModelProperty has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

              var SwaggerModelProperty = function(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 public/js/lib/swagger.js - About 1 hr 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 handleLogin has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
              Open

              function handleLogin() {
                var scopes = [];
              
                if(window.swaggerUi.api.authSchemes 
                  && window.swaggerUi.api.authSchemes.oauth2
              Severity: Minor
              Found in public/js/lib/swagger-oauth.js - About 1 hr 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 SwaggerOperation has 12 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              var SwaggerOperation = function(nickname, path, method, parameters, summary, notes, type, responseMessages, resource, consumes, produces, authorizations) {
              Severity: Major
              Found in public/js/lib/swagger.js - About 1 hr to fix

                Function complete has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  obj.complete = function(response, textStatus, opts) {
                    var headers = {},
                        headerArray = response.getAllResponseHeaders().split("\n");
                
                    for(var i = 0; i < headerArray.length; i++) {
                Severity: Minor
                Found in public/js/lib/swagger.js - About 1 hr to fix

                  Function build has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  SwaggerApi.prototype.build = function() {
                    var _this = this;
                    this.progress('fetching resource list: ' + this.url);
                    var obj = {
                      useJQuery: this.useJQuery,
                  Severity: Minor
                  Found in public/js/lib/swagger.js - About 1 hr to fix

                    Function SwaggerResource has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                    Open

                    var SwaggerResource = function(resourceObj, api) {
                      var _this = this;
                      this.api = api;
                      this.api = this.api;
                      consumes = (this.consumes | []);
                    Severity: Minor
                    Found in public/js/lib/swagger.js - About 1 hr 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 SwaggerModel has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                    Open

                    var SwaggerModel = function(modelName, obj) {
                      this.name = obj.id != null ? obj.id : modelName;
                      this.properties = [];
                      var propertyName;
                      for (propertyName in obj.properties) {
                    Severity: Minor
                    Found in public/js/lib/swagger.js - About 1 hr 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 SwaggerModelProperty has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var SwaggerModelProperty = function(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 public/js/lib/swagger.js - About 1 hr to fix

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

                      SwaggerOperation.prototype.urlify = function(args) {
                        var url = this.resource.basePath + this.pathJson();
                        var params = this.parameters;
                        for(var i = 0; i < params.length; i ++){
                          var param = params[i];
                      Severity: Minor
                      Found in public/js/lib/swagger.js - About 1 hr to fix

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

                        Object.keys = Object.keys || (function () {
                          var hasOwnProperty = Object.prototype.hasOwnProperty,
                            hasDontEnumBug = !{toString:null}.propertyIsEnumerable("toString"),
                            DontEnums = [
                              'toString',
                        Severity: Minor
                        Found in public/js/lib/swagger.js - About 1 hr to fix

                          Function help has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                          SwaggerApi.prototype.help = function() {
                            var operation, operation_name, parameter, resource, resource_name, _i, _len, _ref, _ref1, _ref2;
                            _ref = this.apis;
                            for (resource_name in _ref) {
                              resource = _ref[resource_name];
                          Severity: Minor
                          Found in public/js/lib/swagger.js - About 1 hr 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 SwaggerRequest has 8 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

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

                            Function SwaggerApi has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                            Open

                            var SwaggerApi = function(url, options) {
                              this.url = null;
                              this.debug = false;
                              this.basePath = null;
                              this.authorizations = null;
                            Severity: Minor
                            Found in public/js/lib/swagger.js - 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

                            Severity
                            Category
                            Status
                            Source
                            Language