Showing 187 of 269 total issues
Blueprint
has 50 functions (exceeds 20 allowed). Consider refactoring. Open
let Blueprint = CoreObject.extend({
availableOptions: [],
anonymousOptions: ['name'],
_printableProperties: ['name', 'description', 'availableOptions', 'anonymousOptions', 'overridden'],
- Create a ticketCreate a ticket
addonProto
has 47 functions (exceeds 20 allowed). Consider refactoring. Open
let addonProto = {
/**
The name of this addon.
@public
- Create a ticketCreate a ticket
Function _readPackage
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
_readPackage(packageDir, pkg, isRoot) {
let normalizedPackageDir = path.normalize(packageDir);
// Most of the time, normalizedPackageDir is already a real path (i.e. fs.realpathSync
// will return the same value as normalizedPackageDir if the dir actually exists).
- 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
EmberApp
has 43 functions (exceeds 20 allowed). Consider refactoring. Open
class EmberApp {
/**
EmberApp is the main class Ember CLI uses to manage the Broccoli trees
for your application. It is very tightly integrated with Broccoli and has
a `toTree()` method you can use to get the entire tree for your application.
- Create a ticketCreate a ticket
Function insertIntoFile
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
async function insertIntoFile(fullPath, contentsToInsert, providedOptions) {
let options = providedOptions || {};
let returnValue = {
path: fullPath,
- 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 _import
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
_import(assetPath, options, directory, subdirectory, extension) {
// TODO: refactor, this has gotten very messy. Relevant tests: tests/unit/broccoli/ember-app-test.js
let basename = path.basename(assetPath);
if (p.isType(assetPath, 'js', { registry: this.registry })) {
- 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 getAddonProxy
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function getAddonProxy(targetCacheEntry, parent) {
let _app;
// handle `preprocessJs` separately for Embroider
//
- 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
Project
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class Project {
/**
The Project model is tied to your package.json. It is instantiated
by giving {{#crossLink "Project/closestSync:method"}}{{/crossLink}}
the path to your project.
- Create a ticketCreate a ticket
Function _readPackage
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
_readPackage(packageDir, pkg, isRoot) {
let normalizedPackageDir = path.normalize(packageDir);
// Most of the time, normalizedPackageDir is already a real path (i.e. fs.realpathSync
// will return the same value as normalizedPackageDir if the dir actually exists).
- Create a ticketCreate a ticket
Function _initOptions
has 86 lines of code (exceeds 25 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',
{
- Create a ticketCreate a ticket
Function constructor
has 81 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 run
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
async run(commandOptions, rawArgs) {
if (commandOptions.dryRun) {
commandOptions.skipNpm = true;
}
- Create a ticketCreate a ticket
Function run
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
async run(environmentPromiseHash) {
if (environmentPromiseHash === undefined) {
return Promise.reject(new Error('Unable to execute "run" command without environment argument'));
}
let shutdownOnExit = null;
- Create a ticketCreate a ticket
Function createBlueprints
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
async createBlueprints(options) {
let name = options.args[0];
let noAddonBlueprint = ['mixin', 'blueprint-test'];
let entity = {
- Create a ticketCreate a ticket
PackageInfo
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class PackageInfo {
constructor(pkgObj, realPath, cache, isRoot = false) {
this.pkg = pkgObj;
this.pkg['ember-addon'] = this.pkg['ember-addon'] || {};
this.realPath = realPath;
- Create a ticketCreate a ticket
Function _import
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
_import(assetPath, options, directory, subdirectory, extension) {
// TODO: refactor, this has gotten very messy. Relevant tests: tests/unit/broccoli/ember-app-test.js
let basename = path.basename(assetPath);
if (p.isType(assetPath, 'js', { registry: this.registry })) {
- Create a ticketCreate a ticket
Function exports
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (initialMargin, shouldDescriptionBeGrey) {
initialMargin = initialMargin || '';
let output = '';
- Create a ticketCreate a ticket
Function _fileMapTokens
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
_fileMapTokens(options) {
let { project } = this;
let standardTokens = {
__name__(options) {
if (options.pod && options.hasPathToken) {
- 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 contentFor
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function contentFor(config, match, type, options) {
let content = [];
// This normalizes `rootURL` to the value which we use everywhere inside of Ember CLI.
// This makes sure that the user doesn't have to account for it in application code.
- Create a ticketCreate a ticket
Function mergeTrees
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function mergeTrees(_inputTrees, options) {
options = options || {};
let node = heimdall.start(
{
- Create a ticketCreate a ticket