Showing 187 of 269 total issues
Function insertIntoFile
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function insertIntoFile(fullPath, contentsToInsert, providedOptions) {
let options = providedOptions || {};
let returnValue = {
path: fullPath,
- Create a ticketCreate a ticket
Function createBlueprints
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
async createBlueprints(options) {
let name = options.args[0];
let noAddonBlueprint = ['mixin', 'blueprint-test'];
let entity = {
- 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 getAddonInstance
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
getAddonInstance(parent, addonPkgInfo) {
// If the new addon is itself a bundle host (i.e. lazy engine), there is only one
// instance of the bundle host, and it's in the entries of the bundleHostCache, outside
// of the 'regular' addon caches. Because 'setupBundleHostCache' ran during construction,
// we know that an entry is in the cache with this engine name.
- Create a ticketCreate a ticket
Function run
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
async run(options) {
let hasBuild = !!options.path;
if (hasBuild) {
if (!fs.existsSync(options.path)) {
- Create a ticketCreate a ticket
Function locals
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
locals(options) {
let entity = { name: 'dummy' };
let rawName = entity.name;
let name = stringUtil.dasherize(rawName);
let namespace = stringUtil.classify(rawName);
- Create a ticketCreate a ticket
Function getAddonProxy
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getAddonProxy(targetCacheEntry, parent) {
let _app;
// handle `preprocessJs` separately for Embroider
//
- Create a ticketCreate a ticket
exports
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
module.exports = class DefaultPackager {
constructor(options) {
this._cachedTests = null;
this._cachedVendor = null;
this._cachedPublic = null;
- Create a ticketCreate a ticket
Function locals
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
locals(options) {
let entity = options.entity;
let rawName = entity.name;
let name = stringUtil.dasherize(rawName);
let namespace = stringUtil.classify(rawName);
- Create a ticketCreate a ticket
Function _buildSummary
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
_buildSummary(tree, result, resultAnnotation) {
let buildSteps = 0;
let totalTime = 0;
let node;
- Create a ticketCreate a ticket
Function exports
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (commands, commandName, commandArgs, optionHash) {
let options = optionHash || {};
let project = options.project;
let ui = options.ui;
- Create a ticketCreate a ticket
Function toYarnArgs
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
toYarnArgs(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 _buildSummary
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
_buildSummary(tree, result, resultAnnotation) {
let buildSteps = 0;
let totalTime = 0;
let node;
- 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 16 (exceeds 5 allowed). Consider refactoring. Open
async run(commandOptions, rawArgs) {
if (commandOptions.dryRun) {
commandOptions.skipNpm = true;
}
- 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 16 (exceeds 5 allowed). Consider refactoring. Open
async run(commandOptions, rawArgs) {
let projectName = rawArgs[0],
message;
commandOptions.name = rawArgs.shift();
- 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 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
async run(commandOptions) {
let hasBuild = !!commandOptions.path;
let outputPath;
if (hasBuild) {
- Create a ticketCreate a ticket
Function getHostAddonInfo
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
getHostAddonInfo(packageInfoForLazyEngine) {
const cacheKey = `${this.project._packageInfo.realPath}-${packageInfoForLazyEngine.realPath}`;
let hostInfoCacheEntry = this._hostAddonInfoCache.get(cacheKey);
- Create a ticketCreate a ticket
Function _readNodeModulesList
has 49 lines of code (exceeds 25 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
- Create a ticketCreate a ticket
Function instantiateAddons
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function instantiateAddons(parent, project, addonPackages) {
// depending on whether this is really a project or an addon, the 'name' property may be a getter.
let parentName = typeof parent.name === 'function' ? parent.name() : parent.name;
logger.info('instantiateAddons for: ', parentName);
- Create a ticketCreate a ticket
Function build
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
async build(addWatchDirCallback, resultAnnotation) {
await this.ensureBroccoliBuilder();
let buildResults, uiProgressIntervalID;
- Create a ticketCreate a ticket
Function run
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
async run(commandOptions, rawArgs) {
let projectName = rawArgs[0],
message;
commandOptions.name = rawArgs.shift();
- Create a ticketCreate a ticket