Showing 187 of 269 total issues
Function determineOutputs
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function determineOutputs(version) {
let tag = `v${version}`;
let latestEC = await latestVersion('ember-cli');
let isLatest = version === latestEC;
let repo = `https://github-actions:${GITHUB_TOKEN}@github.com/${REPO}.git`;
- Create a ticketCreate a ticket
Function runPromise
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
let runPromise = Promise.resolve().then(async () => {
let resultOrExitCode;
try {
instrumentation.stopAndReport('init');
- Create a ticketCreate a ticket
Function init
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
init(parent, project) {
this._super();
this.parent = parent;
this.project = project;
this.ui = project && project.ui;
- Create a ticketCreate a ticket
Function updateDependencies
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
async function updateDependencies(dependencies) {
for (let dependencyKey in dependencies) {
let dependencyName = removeTemplateExpression(dependencyKey);
if (!shouldCheckDependency(dependencyName)) {
- 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 _generatePackageJson
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
_generatePackageJson(options, isInstall) {
let packagePath = path.join(this.project.root, 'package.json');
let contents = this._readJsonSync(packagePath);
let { root, name } = this._processTokens(options.entity.name);
let newPath = [root, name].join('/');
- 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 isDevelopingAddon
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
isDevelopingAddon() {
if (process.env.EMBER_ADDON_ENV === 'development' && this.parent instanceof Project) {
const parentName = this.parent.name();
// If the name in package.json and index.js match, we're definitely developing
if (parentName === this.name) {
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
async run(options) {
let directoryName = options.directoryName ? options.directoryName : directoryForPackageName(options.projectName);
if (options.dryRun) {
if (fs.existsSync(directoryName) && fs.readdirSync(directoryName).length) {
- 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 assignOption
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
assignOption(option, parsedOptions, commandOptions) {
let isValid = isValidParsedOption(option, parsedOptions[option.name]);
if (isValid) {
if (parsedOptions[option.name] === undefined) {
if (option.default !== undefined) {
- 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 isValidAlias
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function isValidAlias(alias, expectedType) {
let type = typeof alias;
let value, valueType;
if (type === 'string') {
return 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 get
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
get(targetCacheEntry, property) {
if (property === 'parent') {
return parent;
}
- Create a ticketCreate a ticket
Function updatePackageJson
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
updatePackageJson(content) {
let contents = JSON.parse(content);
contents.name = stringUtil.dasherize(this.options.entity.name);
contents.description = this.description;
- Create a ticketCreate a ticket
Function run
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(commandOptions, rawArgs) {
let blueprintName = rawArgs[0];
let entityName = rawArgs[1];
if (!blueprintName) {
- Create a ticketCreate a ticket
Function _importAddonTransforms
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
_importAddonTransforms() {
this.project.addons.forEach((addon) => {
if (this.shouldIncludeAddon(addon)) {
if (addon.importTransforms) {
let transforms = addon.importTransforms();
- Create a ticketCreate a ticket
Function parseAlias
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
parseAlias(option, alias) {
let aliasType = typeof alias;
let key, value, aliasValue;
if (isValidAlias(alias, option.type)) {
- Create a ticketCreate a ticket
Function deprecate
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function deprecate(description, condition, options) {
assert('When calling `deprecate`, you must provide a description as the first argument.', description);
assert('When calling `deprecate`, you must provide a condition as the second argument.', arguments.length > 1);
assert(
- Create a ticketCreate a ticket
Function constructor
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(root, pkg, ui, cli) {
logger.info('init root: %s', root);
this.root = root;
this.pkg = pkg;
- Create a ticketCreate a ticket
Function toYarnArgs
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
toYarnArgs(command, options) {
let args = [];
if (command === 'install') {
if (options.save) {
- Create a ticketCreate a ticket
Function totalTime
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function totalTime(tree) {
let totalTime = 0;
let nodeItr;
let node;
let statName;
- 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 parseAlias
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
parseAlias(option, alias) {
let aliasType = typeof alias;
let key, value, aliasValue;
if (isValidAlias(alias, option.type)) {
- 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 constructor
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
constructor(defaults, options) {
if (arguments.length === 0) {
options = {};
} else if (arguments.length === 1) {
options = defaults;
- 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"