atsid/circuits-js

View on GitHub

Showing 23 of 90 total issues

Function constructor has 122 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            constructor: function (schema, refResolver) {

                logger.debug("Creating reader for schema", schema);

                if (!refResolver) {
Severity: Major
Found in js/ZypSMDReader.js - About 4 hrs to fix

    Function constructor has 99 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                constructor: function (reader, provider, factoryPlugins, servicePlugins) {
    
                    var that = this,
                        methodsHash = {},
                        methodsArr = [],
    Severity: Major
    Found in js/Service.js - About 3 hrs to fix

      Function constructor has 94 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                      constructor: function () {
                          this.type = "mixin";
      
                          this.fn = function (service) {
                              service.methodName = this.methodName;
      Severity: Major
      Found in js/plugins/DojoReadApiPlugin.js - About 3 hrs to fix

        Function fn has 91 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                            this.fn = function (service) {
                                service.methodName = this.methodName;
                                service.methodArgs = this.methodArgs;
                                service.identityAttributes = this.identityAttributes;
        
        Severity: Major
        Found in js/plugins/DojoReadApiPlugin.js - About 3 hrs to fix

          File ZypSMDReader.js has 308 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          "use strict";
          /**
           * Parses an SMD and provides methods to read information from it for working with RESTful services.
           * Uses the format defined by Kris Zyp and utilized by Dojo for RPC stores
           */
          Severity: Minor
          Found in js/ZypSMDReader.js - About 3 hrs to fix

            Function constructor has 80 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    constructor: function (config) {
                        var calls = [], executed = false,
                            requests = [];
            
                        this.autoRefreshInterval = config.autoRefreshInterval || 0;
            Severity: Major
            Found in js/ServiceQueue.js - About 3 hrs to fix

              Function constructor has 79 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          constructor: function (delegate) {
              
                              var storage = new WebStorage(),
                                  cacheId = "circuits.retrycache",
              
              Severity: Major
              Found in js/OfflineTolerantProvider.js - About 3 hrs to fix

                Function invoke has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                            invoke: function (params, plugins) {
                                logger.debug("Calling service method: " + this.name + " with params", params);
                
                                var that = this,
                                    provider = this.provider,
                Severity: Major
                Found in js/ServiceMethod.js - About 2 hrs to fix

                  File TestPluginMatcher.js has 280 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  define([
                      "circuits/PluginMatcher",
                      "circuits/util",
                      "circuits/declare"
                  ], function (
                  Severity: Minor
                  Found in test/TestPluginMatcher.js - About 2 hrs to fix

                    File TestServicePlugins.js has 276 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    define([
                        "circuits/ServiceFactory",
                        "circuits/Service",
                        "circuits/ZypSMDReader",
                        "circuits/Request",
                    Severity: Minor
                    Found in test/TestServicePlugins.js - About 2 hrs to fix

                      Function invokeXhrSend has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              invokeXhrSend: function (params) {
                                  var xhr = new XMLHttpRequest(),
                                      async = typeof (params.asynchronous) === "boolean" ? params.asynchronous : this.asynchronous,
                      
                                      readystatechange = function () {
                      Severity: Major
                      Found in js/NativeXhrDataProvider.js - About 2 hrs to fix

                        Function constructor has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                constructor: function (config) {
                                    var namespace = (config && config.namespace) || this.declaredClass,
                                        getNamespaceObject = function (key, storage) {
                                            var item = JSON.parse(storage.getItem(namespace));
                                            return item[key];
                        Severity: Major
                        Found in js/WebStorage.js - About 2 hrs to fix

                          Function convertCallbackParam has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                          this.convertCallbackParam = function (param) {
                                              var ret = param || [], plugin;
                          
                                              if (param && Object.prototype.toString.call(param) !== "[object Array]") {
                                                  ret = [];
                          Severity: Major
                          Found in js/Service.js - About 2 hrs to fix

                            Function invokeJsonpRequest has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    invokeJsonpRequest: function (params) {
                                        var element = document.createElement('script'),
                                            headElement = document.getElementsByTagName('head')[0],
                                            load = params.load,
                                            error = params.error,
                            Severity: Minor
                            Found in test/MockJsonpDataProvider.js - About 1 hr to fix

                              Function processResponse has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                          processResponse: function (statusCode, data, plugins, ioArgs) {
                                              var isList = this.reader.isListResponse(this.name),
                                              //TODO: "any" is JSONSchema default if no type is defined. this should come through a model though so we aren't tacking it on everywhere
                                                  returnType = this.reader.getResponseSchema(this.name).type || "any", //this could fail if there is no "returns" block on the method
                                                  payload,
                              Severity: Minor
                              Found in js/ServiceMethod.js - About 1 hr to fix

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

                                            this.execute = function (callback, scope) {
                                                var that = this;
                                
                                                if (this.hasBeenExecuted()) {
                                                    if (!this.executionComplete()) {
                                Severity: Minor
                                Found in js/ServiceQueue.js - About 1 hr to fix

                                  Function invokeJsonpRequest has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                              invokeJsonpRequest: function (params) {
                                                  var element = document.createElement('script'),
                                                      headElement = document.getElementsByTagName('head')[0],
                                                      load = params.load,
                                                      error = params.error,
                                  Severity: Minor
                                  Found in js/NativeJsonpDataProvider.js - About 1 hr to fix

                                    Function resolveProperties has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                                function resolveProperties(schema) {
                                    
                                                    logger.debug("Resolving sub-properties for " + schema.id);
                                    
                                                    // resolve inherited global parameters
                                    Severity: Minor
                                    Found in js/ZypSMDReader.js - About 1 hr to fix

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

                                      module.exports = function(config){
                                        config.set({
                                          // base path, that will be used to resolve files and exclude
                                          basePath: '',
                                      
                                      
                                      Severity: Minor
                                      Found in karma.conf.js - About 1 hr to fix

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

                                                    processRequest: function (payload, plugins, ioArgs) {
                                                        var writePayload = payload || "", intermediate, that = this;
                                        
                                                        // Very simiplistic payload type coercion
                                                        if (this.requestPayloadName && !payload[this.requestPayloadName]) {
                                        Severity: Minor
                                        Found in js/ServiceMethod.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language