Showing 7 of 17 total issues
Function buildBlueprintCommand
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
const buildBlueprintCommand = (blueprint, runner) => {
// extract custom command pieces
let {
aliases = [],
options,
Function buildBlueprintCommand
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
const buildBlueprintCommand = (blueprint, runner) => {
// extract custom command pieces
let {
aliases = [],
options,
- 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 run
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(cliArgs) {
this.confirmGit();
this.createDirTask.run(cliArgs).then(() => {
let fetch_url;
Function parseBlueprintSetting
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function parseBlueprintSetting(setting) {
if (_isArray(setting)) {
return [...setting, './blueprints'];
} else if (_isString(setting)) {
return [setting, './blueprints'];
- 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
Avoid too many return
statements within this function. Open
return depascalize(string, { separator: '-' });
Avoid too many return
statements within this function. Open
return ['./blueprints'];
Function normalizeCasing
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const normalizeCasing = (string, casing) => {
const types = ['default', 'snake', 'pascal', 'camel', 'dashes'];
if (types.indexOf(casing) === -1) {
throw new Error(`Casing must be one of: ${types.join(', ')} types`);
- 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"