PieceMeta/node-piecemeta-apiclient

View on GitHub

Showing 6 of 8 total issues

Function client has 137 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    module.exports.client = function (httpService, dataParser, apiConfig) {
        var auth = require('./util/auth-header');
        http = httpService;
        parser = dataParser;
        config = apiConfig;
Severity: Major
Found in src/apiclient.js - About 5 hrs to fix

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

                resource: function (resourceName, query) {
                    return {
                        action: function (method, data, callback, progress) {
                            var path = '/' + resourceName;
    
    
    Severity: Minor
    Found in src/apiclient.js - About 2 hrs to fix

      Function action has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                          action: function (method, data, callback, progress) {
                              var path = '/' + resourceName;
      
                              if (data === null) {
                                  data = undefined;
      Severity: Minor
      Found in src/apiclient.js - About 1 hr to fix

        Function request has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            module.exports.request = function (config, callback, progress) {
        
                var parsedUrl = url.parse(config.url);
                var requestSetup = {
                    host: parsedUrl.hostname,
        Severity: Minor
        Found in src/http/node-http.js - About 1 hr to fix

          Function request has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              module.exports.request = function (config, callback, progress) {
                  if (typeof XMLHttpRequest === 'undefined') {
                      if (typeof callback === 'function') {
                          callback(new Error('XMLHttpRequest not available'), null);
                      }
          Severity: Minor
          Found in src/http/xmlhttp.js - About 1 hr to fix

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

            module.exports = function (grunt) {
                'use strict';
                grunt.initConfig({
                    pkg: grunt.file.readJSON('package.json'),
                    gluejs: {
            Severity: Minor
            Found in Gruntfile.js - About 1 hr to fix
              Severity
              Category
              Status
              Source
              Language