Showing 8 of 27 total issues
Function executeCmd
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function executeCmd(command, args, options) {
var _proc;
var stderr = '';
var stdout = '';
var deferred = Q.defer();
Function getRepoType
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getRepoType(source, decEndpoint){
var deferred = Q.defer();
checkGitRepo(source)
.progress(function (data) {
console.log(data);
Function extract
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function extract(src, dst, opts) {
var extractor;
var promise;
opts = opts || {};
Function executeCommands
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var executeCommands = function (instance, type){
var deferred = Q.defer();
var commands = instance[type + 'Commands'] || [];
var cwd;
Function createLink
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createLink(src, dst, type) {
var dstDir = path.dirname(dst);
// Create directory
return Q.nfcall(mkdirp, dstDir)
// Check if source exists
Function _checkout
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
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';
Function executeCmd
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
function executeCmd(command, args, options) {
var _proc;
var stderr = '';
var stdout = '';
var deferred = Q.defer();
- Read upRead up
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
Open
function extract(src, dst, opts) {
var extractor;
var promise;
opts = opts || {};
- Read upRead up
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"