Showing 5 of 16 total issues
Function EmberAppWithPackages
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function EmberAppWithPackages(defaults, options) {
var isAddon = !!(defaults.project.pkg["ember-addon"] && defaults.project.pkg["ember-addon"].configPath),
sharedBuildConfig = {
// TODO: re-enable jshint once it's actually working fine, for now it just slows down the build
// and running `ember test` it only jshints boot, but not the packages. We'll rely an npm script
Function EmberAppWithPackages
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
Open
function EmberAppWithPackages(defaults, options) {
var isAddon = !!(defaults.project.pkg["ember-addon"] && defaults.project.pkg["ember-addon"].configPath),
sharedBuildConfig = {
// TODO: re-enable jshint once it's actually working fine, for now it just slows down the build
// and running `ember test` it only jshints boot, but not the packages. We'll rely an npm script
- Read upRead up
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 packagesApplications
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.packagesApplications = packageNames.map(function(packageName) {
// packages export their own js file and are intended to distribute the code-base.
var perPackageConfig = perPackageConfigFactory(packageName);
perPackageConfig = merge({}, perPackageConfig, {appTreesBasePath: 'packages/' + packageName});
Function _getHandlerFunction
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_getHandlerFunction: function() {
var container = getContainer(this);
var DefaultRoute = getFactory(this, 'route:basic');
var LazyLoaderRoute =getFactory(this, 'route:-lazy-loader');
var lazyLoaderService = container.lookup('service:lazy-loader');
Function loadAssets
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
export default function loadAssets(urls = []) {
urls = urls || [];
const promises = urls.map(url=>
url.match(/\.js$/) ?
loadScript(url) :
- Read upRead up
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"