Showing 187 of 269 total issues
Function throwFormattedBroccoliError
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
throwFormattedBroccoliError(err) {
// TODO fix ember-cli/console-ui to handle current broccoli broccoliPayload
let broccoliPayload = err && err.broccoliPayload;
if (broccoliPayload) {
if (!broccoliPayload.error) {
- Read upRead up
- Create a ticketCreate a ticket
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 findPackageManager
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
async findPackageManager(packageManager = null) {
if (packageManager === 'yarn') {
logger.info('yarn requested -> trying yarn');
return this.checkYarn();
}
- Read upRead up
- Create a ticketCreate a ticket
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 _readNodeModulesList
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
_readNodeModulesList(nodeModulesDir) {
let normalizedNodeModulesDir = path.normalize(nodeModulesDir);
// Much of the time, normalizedNodeModulesDir is already a real path (i.e.
// fs.realpathSync will return the same value as normalizedNodeModulesDir, if
- Read upRead up
- Create a ticketCreate a ticket
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 isExperimentEnabled
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function isExperimentEnabled(experimentName) {
if (!availableExperiments.includes(experimentName)) {
return false;
}
- Read upRead up
- Create a ticketCreate a ticket
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 toPNPMArgs
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
toPNPMArgs(command, options) {
let args = [];
if (command === 'install') {
if (options.save) {
- Read upRead up
- Create a ticketCreate a ticket
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 _printHelp
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
_printHelp(commandOptions, rawArgs) {
let rootCommand = new RootCommand({
ui: this.ui,
project: this.project,
commands: this.commands,
- Read upRead up
- Create a ticketCreate a ticket
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 a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
async run(commandOptions) {
let hasBuild = !!commandOptions.path;
let outputPath;
if (hasBuild) {
- Read upRead up
- Create a ticketCreate a ticket
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 findLCAHost
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
findLCAHost(engineInstance) {
// only compute once for a given engine
// we're using the engine name as the cache key here because regardless of its
// version, lazy engines will always get output to: `engines-dist/${engineName}`
let lcaHost = this._lcaHostCache.get(engineInstance.name);
- Create a ticketCreate a ticket
Function constructor
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(defaults, options) {
if (arguments.length === 0) {
options = {};
} else if (arguments.length === 1) {
options = defaults;
- Create a ticketCreate a ticket
Function throwFormattedBroccoliError
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
throwFormattedBroccoliError(err) {
// TODO fix ember-cli/console-ui to handle current broccoli broccoliPayload
let broccoliPayload = err && err.broccoliPayload;
if (broccoliPayload) {
if (!broccoliPayload.error) {
- Create a ticketCreate a ticket
Function _fileSystemInfo
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
_fileSystemInfo() {
if (this._cachedFileSystemInfo) {
return this._cachedFileSystemInfo;
}
- Create a ticketCreate a ticket
Function serverMiddleware
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
serverMiddleware(options) {
let app = options.app;
options = options.options;
let broccoliMiddleware = options.middleware || require('broccoli-middleware').watcherMiddleware;
- Create a ticketCreate a ticket
Function constructor
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(options) {
this._cachedTests = null;
this._cachedVendor = null;
this._cachedPublic = null;
this._cachedConfig = null;
- Create a ticketCreate a ticket
Function _getBundledPackageInfos
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
_getBundledPackageInfos(pkgInfoToStartAt) {
let pkgInfos = this._bundledPackageInfoCache.get(pkgInfoToStartAt);
if (pkgInfos) {
return pkgInfos;
- Create a ticketCreate a ticket
Function stopAndReport
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
stopAndReport(name) {
if (!instrumentationEnabled(this.config)) {
return;
}
- Create a ticketCreate a ticket
Function isExperimentEnabled
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function isExperimentEnabled(experimentName) {
if (!availableExperiments.includes(experimentName)) {
return false;
}
- Create a ticketCreate a ticket
Function constructor
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(options) {
this.isVizEnabled = vizEnabled;
this.isEnabled = instrumentationEnabled;
this.ui = options.ui;
- Create a ticketCreate a ticket
Function treeFor
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
treeFor(treeType) {
let node = heimdall.start({
name: `treeFor(${this.name} - ${treeType})`,
addonName: this.name,
treeType,
- Create a ticketCreate a ticket
Function getPackageBlueprints
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
getPackageBlueprints(collection, options, singleBlueprintName) {
let verbose = options.verbose;
let blueprints = collection.blueprints;
if (!verbose) {
- Create a ticketCreate a ticket
Function getAllBlueprints
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
getAllBlueprints(options) {
let lookupPaths = this.project.blueprintLookupPaths();
let blueprintList = Blueprint.list({ paths: lookupPaths });
let output = '';
- Create a ticketCreate a ticket