Showing 187 of 269 total issues
Function _initOptions
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
_initOptions(options) {
deprecate(
'Using the `outputPaths` build option is deprecated, as output paths will no longer be predetermined under Embroider.',
typeof options.outputPaths === '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 addAddonsToProject
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
addAddonsToProject(options) {
let taskOptions = {
packages: [],
extraArgs: options.extraArgs || [],
blueprintOptions: options.blueprintOptions || {},
- 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 determineOutputs
has a Cognitive Complexity of 15 (exceeds 5 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`;
- 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 jshintAddonTree
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
jshintAddonTree() {
let trees = [];
let addonPath = this._treePathFor('addon');
if (fs.existsSync(addonPath)) {
- Create a ticketCreate a ticket
Function startHttpServer
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
async startHttpServer() {
this.app = this.express();
const compression = require('compression');
this.app.use(
compression({
- Create a ticketCreate a ticket
Function _fileMapTokens
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
_fileMapTokens(options) {
let { project } = this;
let standardTokens = {
__name__(options) {
if (options.pod && options.hasPathToken) {
- Create a ticketCreate a ticket
Function _showObjErrors
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
_showObjErrors(obj) {
let errorEntries = obj.hasErrors() ? obj.errors.getErrors() : null;
if (!errorEntries || (errorEntries.length === 1 && errorEntries[0].type === Errors.ERROR_PACKAGE_DIR_MISSING)) {
return;
- Create a ticketCreate a ticket
Function getAddonInstance
has a Cognitive Complexity of 14 (exceeds 5 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.
- 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 exports
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (commands, commandName, commandArgs, optionHash) {
let options = optionHash || {};
let project = options.project;
let ui = options.ui;
- 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 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
_printHelp(commandOptions, rawArgs) {
let rootCommand = new RootCommand({
ui: this.ui,
project: this.project,
commands: this.commands,
- Create a ticketCreate a ticket
Function packageStyles
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
packageStyles(tree) {
if (this._cachedProcessedStyles === null) {
let cssMinificationEnabled = this.minifyCSS.enabled;
let options = {
outputPaths: this.distPaths.appCssFile,
- Create a ticketCreate a ticket
Function addAddonsToProject
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
addAddonsToProject(options) {
let taskOptions = {
packages: [],
extraArgs: options.extraArgs || [],
blueprintOptions: options.blueprintOptions || {},
- Create a ticketCreate a ticket
Function validateAndRun
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
async validateAndRun(args) {
let commandOptions = this.parseArgs(args);
// If the `help` option was passed, resolve with `callHelp` to call the `help` command:
if (commandOptions && (commandOptions.options.help || commandOptions.options.h)) {
- 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 main
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function main() {
let github = new Octokit({ version: '3.0.0', auth: process.env.GITHUB_AUTH });
let res = await github.repos.compareCommits({
owner: 'ember-cli',
- Create a ticketCreate a ticket
Function validateAndRun
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
async validateAndRun(args) {
let commandOptions = this.parseArgs(args);
// If the `help` option was passed, resolve with `callHelp` to call the `help` command:
if (commandOptions && (commandOptions.options.help || commandOptions.options.h)) {
- Create a ticketCreate a ticket
Function packageTestFiles
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
packageTestFiles(tree, coreTestTree) {
let testSupportPath = this.distPaths.testSupportJsFile;
testSupportPath = testSupportPath.testSupport || testSupportPath;
- Create a ticketCreate a ticket
Function exports
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = async function (options) {
// `process` should be captured before we require any libraries which
// may use `process.exit` work arounds for async cleanup.
willInterruptProcess.capture(options.process || process);
- Create a ticketCreate a ticket
Function parseArgs
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
parseArgs(commandArgs) {
let knownOpts = {}; // Parse options
let commandOptions = {};
let parsedOptions;
- Create a ticketCreate a ticket
Function findPackageManager
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
async findPackageManager(packageManager = null) {
if (packageManager === 'yarn') {
logger.info('yarn requested -> trying yarn');
return this.checkYarn();
}
- Create a ticketCreate a ticket
Function updateRepo
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function updateRepo(version) {
let repoName = APP_REPO;
let command = 'new';
let name = 'my-app';
- Create a ticketCreate a ticket