Showing 187 of 269 total issues
Function _addonTemplateFiles
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
_addonTemplateFiles(addonTree) {
if (this._cachedAddonTemplateFiles) {
return this._cachedAddonTemplateFiles;
}
- Create a ticketCreate a ticket
Function compileAddon
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
compileAddon(tree) {
if (!this.options) {
throw new SilentError(
`Ember CLI addons manage their own module transpilation during the \`treeForAddon\` processing. ` +
`\`${this.name}\` (found at \`${this.root}\`) has removed \`this.options\` ` +
- Create a ticketCreate a ticket
Function memorySwapUsedLinux
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function memorySwapUsedLinux() {
try {
const { stdout } = execa.sync('free', ['-b']);
const lines = stdout.split('\n').filter(Boolean);
const header = lines.shift();
- Create a ticketCreate a ticket
Function addDependencies
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
addDependencies(dependencies) {
if (!dependencies) {
return null;
}
- Create a ticketCreate a ticket
Function build
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
async build(addWatchDirCallback, resultAnnotation) {
await this.ensureBroccoliBuilder();
let buildResults, uiProgressIntervalID;
- 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 getHostAddonInfo
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
getHostAddonInfo(packageInfoForLazyEngine) {
const cacheKey = `${this.project._packageInfo.realPath}-${packageInfoForLazyEngine.realPath}`;
let hostInfoCacheEntry = this._hostAddonInfoCache.get(cacheKey);
- 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 fileMapTokens
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
fileMapTokens() {
return {
__name__(options) {
if (options.pod && options.hasPathToken) {
return options.locals.blueprintName;
- 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 processAppMiddlewares
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
processAppMiddlewares(options) {
if (this.project.has(this.serverRoot)) {
try {
let server = this.project.require(this.serverRoot);
- 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 _getBundledPackageInfos
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
_getBundledPackageInfos(pkgInfoToStartAt) {
let pkgInfos = this._bundledPackageInfoCache.get(pkgInfoToStartAt);
if (pkgInfos) {
return pkgInfos;
- 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 addMiddleware
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
addMiddleware(config) {
let app = config.app;
let options = config.options;
let watcher = options.watcher;
let rootURL = options.rootURL === '' ? '/' : cleanBaseURL(options.rootURL);
- Create a ticketCreate a ticket
Function totalTime
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function totalTime(tree) {
let totalTime = 0;
let nodeItr;
let node;
let statName;
- Create a ticketCreate a ticket
Function didChange
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
didChange(results) {
let previousTree = this.tree;
let files;
if (results.stack) {
- Create a ticketCreate a ticket
Function processAppAndDependencies
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
processAppAndDependencies(allTrees) {
if (this._cachedProcessedAppAndDependencies === null) {
let config = this.packageConfig();
let internal = this.packageEmberCliInternalFiles();
let appContentsWithCompiledTemplates = this._debugTree(
- Create a ticketCreate a ticket
Function run
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
run(options) {
const chalk = require('chalk');
let ui = this.ui;
let packageNames = options.packages || [];
let blueprintOptions = options.blueprintOptions || {};
- Create a ticketCreate a ticket
Function serverMiddleware
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
serverMiddleware(options) {
let app = options.app,
server = options.options.httpServer;
options = options.options;
- Create a ticketCreate a ticket
Function processFilesForUninstall
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
processFilesForUninstall(intoDir, templateVariables) {
let fileInfos = this._getFileInfos(this.files(this.options), intoDir, templateVariables);
this._ignoreUpdateFiles();
- Create a ticketCreate a ticket
Function addonCommands
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
addonCommands() {
const Command = require('../models/command');
let commands = Object.create(null);
this.addons.forEach((addon) => {
if (!addon.includedCommands) {
- Create a ticketCreate a ticket
Function run
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
async run(options) {
let cwd = process.cwd();
let name = options.rawName;
let blueprintOption = options.blueprint;
// If we're in a dry run, pretend we changed directories.
- Create a ticketCreate a ticket
Function configReplacePatterns
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function configReplacePatterns(options) {
return [
{
match: /{{\s?rootURL\s?}}/g,
replacement(config) {
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
if (hasOptions) {
let indent = `\n `;
let outdent = `\n `;
blueprintOptions =
- Create a ticketCreate a ticket