tcorral/mystiquex

View on GitHub

Showing 8 of 27 total issues

Function executeCmd has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function executeCmd(command, args, options) {
    var _proc;
    var stderr = '';
    var stdout = '';
    var deferred = Q.defer();
Severity: Major
Found in lib/utils/cmd.js - About 2 hrs to fix

    Function getRepoType has 72 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function getRepoType(source, decEndpoint){
        var deferred = Q.defer();
        checkGitRepo(source)
            .progress(function (data) {
                console.log(data);
    Severity: Major
    Found in lib/utils/getRepoType.js - About 2 hrs to fix

      Function extract has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function extract(src, dst, opts) {
          var extractor;
          var promise;
      
          opts = opts || {};
      Severity: Minor
      Found in lib/utils/extract.js - About 1 hr to fix

        Function executeCommands has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var executeCommands = function (instance, type){
            var deferred = Q.defer();
            var commands = instance[type + 'Commands'] || [];
            var cwd;
        
        
        Severity: Minor
        Found in lib/resolvers/classes/Base.js - About 1 hr to fix

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

          function createLink(src, dst, type) {
              var dstDir = path.dirname(dst);
              // Create directory
              return Q.nfcall(mkdirp, dstDir)
                  // Check if source exists
          Severity: Minor
          Found in lib/utils/createLink.js - About 1 hr to fix

            Function _checkout has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            GitHub.prototype._checkout = function (){
                var deferred = Q.defer();
                var self = this;
                var tarballUrl = 'https://github.com/' + this.org + '/' + this.repo + '/archive/{{tag}}.tar.gz';
            
            
            Severity: Minor
            Found in lib/resolvers/classes/GitHub.js - About 1 hr to fix

              Function executeCmd has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              function executeCmd(command, args, options) {
                  var _proc;
                  var stderr = '';
                  var stdout = '';
                  var deferred = Q.defer();
              Severity: Minor
              Found in lib/utils/cmd.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

              Function extract has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function extract(src, dst, opts) {
                  var extractor;
                  var promise;
              
                  opts = opts || {};
              Severity: Minor
              Found in lib/utils/extract.js - About 25 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