Showing 20 of 22 total issues
Function exports
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
/* jshint ignore: line */module.exports = function(
thrallConfig,
path,
grunt,
glob,
Function exports
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
/* jshint ignore: line */module.exports = function(
thrallConfig,
path,
grunt,
glob,
- 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 initConfig
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initConfig(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
srcFiles: 'lib/*.js',
testFiles: [
Function taskFactory
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function taskFactory(
thrallConfig,
grunt,
mergeGruntPluginConfig,
applyTaskOptions,
Function exports
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(_, grunt, cliOptions) {
'use strict';
/** @const */
var OPTION_TYPE_ARRAY = 'array';
- 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 exports
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(_, grunt, cliOptions) {
'use strict';
/** @const */
var OPTION_TYPE_ARRAY = 'array';
Function initFactory
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function initFactory(
thrallConfig,
path,
grunt,
loadGruntPlugins,
Function initFactory
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function initFactory(
thrallConfig,
path,
grunt,
loadGruntPlugins,
- 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 addTaskFactory
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function addTaskFactory(
task,
baseInjector,
thrallConfig,
grunt,
Function exports
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
task,
baseInjector,
thrallConfig,
grunt,
glob,
Function loadGruntPluginsFactory
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function loadGruntPluginsFactory(
thrallConfig,
grunt,
findupSync,
path,
Function getSubConfig
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getSubConfig(tokens, subtaskInjector) {
var subConfigPath = path.join.apply(
path,
[thrallConfig.dir, CONFIG_DIR].concat(tokens)
);
Function addTasks
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addTasks(tasks) {
if (!_.isArray(tasks) || !tasks.length) {
tasks = getTasks();
}
Function loadGruntPlugins
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function loadGruntPlugins() {
grunt.verbose.subhead(
'loading grunt plugins for "' + thrallConfig.name + '"...'
);
Function exports
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
thrallConfig,
path,
grunt,
loadGruntPlugins,
addTasks,
Function exports
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
thrallConfig,
path,
grunt,
glob,
_,
Function exports
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
thrallConfig,
grunt,
mergeGruntPluginConfig,
applyTaskOptions,
_,
Function exports
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
thrallConfig,
grunt,
findupSync,
path,
_
Function addTaskFactory
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function addTaskFactory(
task,
baseInjector,
thrallConfig,
grunt,
- 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 taskFactory
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function taskFactory(
thrallConfig,
grunt,
mergeGruntPluginConfig,
applyTaskOptions,
- 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"