Showing 6 of 6 total issues
Function moveToDest
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function moveToDest(srcDir, destDir) {
if (!this.options.cleanOutput) {
return srcDir;
}
var content, cssDir, src;
- 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 walkCachedSync
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function walkCachedSync(baseDir, options) {
baseDir = baseDir || '.';
options = options || {};
var file, sub, oldHash;
var cache = options.cache && options.cache.paths || {};
- 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 moveToDest
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function moveToDest(srcDir, destDir) {
if (!this.options.cleanOutput) {
return srcDir;
}
var content, cssDir, src;
Function walkCachedSync
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function walkCachedSync(baseDir, options) {
baseDir = baseDir || '.';
options = options || {};
var file, sub, oldHash;
var cache = options.cache && options.cache.paths || {};
Function CompassCompiler
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function CompassCompiler(inputTree, files, options) {
options = arguments.length > 2 ? (options || {}) : (files || {});
if (arguments.length > 2) {
console.log('[broccoli-compass] DEPRECATION: passing files to broccoli-compass constructor as second parameter is deprecated, ' +
'use options.files instead');
- 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 generateCmdLine
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
CompassCompiler.prototype.generateCmdLine = function () {
var value;
var filtredOptions = {};
var options = this.options;
var cmd = [options.compassCommand, 'compile'];
- 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"