Showing 34 of 52 total issues
File ember-cli.js
has 557 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { readOnly } from '@ember/object/computed';
import Service, { inject as service } from '@ember/service';
import RSVP from 'rsvp';
import { run } from '@ember/runloop';
import $ from 'jquery';
Function processEmberShims
has 212 lines of code (exceeds 25 allowed). Consider refactoring. Open
function processEmberShims() {
var shims = {
'ember': {
'default': Ember
},
Function exports
has 128 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(defaults) {
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const funnel = require('broccoli-funnel');
const mergeTrees = require('broccoli-merge-trees');
Function default
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
export default function(babel, _options) {
var options = _options || {};
function htmlbarsInlineCompilerPlugin(babel) {
let t = babel.types;
- 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 handleColocatedComponents
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleColocatedComponents(gist) {
let colocatedTemplatesRegex = /^components\/([^/]+\/)*[^/]+\.hbs$/
let files = gist.get('files').toArray();
let filePaths = files.map(file => file.get('filePath'));
Function resolveAddonsTask
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
resolveAddonsTask: task(function *(addons, dependencies, emberVersion) {
let done = false;
while (!done) {
let addonPromises = {};
let addonNames = Object.keys(addons);
- 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 buildDependencies
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildDependencies(twiddleJSON) {
let deps = twiddleJSON.dependencies;
let depCssLinkTags = '';
let depScriptTags = '';
let testStuff = '';
Function exports
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(environment) {
let deployTarget = process.env.DEPLOY_TARGET;
let rootURL = process.env.TWIDDLE_ROOT_URL || '/';
let host = process.env.GH_API_HOST || 'https://api.github.com';
let toriiGHEBaseURL = process.env.TORII_GHE_OAUTH || null;
`` has 24 functions (exceeds 20 allowed). Consider refactoring. Open
actions: {
contentsChanged() {
this.set('unsaved', true);
this.rebuildApp.perform();
},
Function drags
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.drags = function(opt) {
if (opt === "destroy") {
destroyFn(this);
return;
Function buildQUnitTree
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
function buildQUnitTree(app) {
const funnel = require('broccoli-funnel');
const concat = require('broccoli-concat');
const replace = require('broccoli-string-replace');
const mergeTrees = require('broccoli-merge-trees');
Function default
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(babel, _options) {
var options = _options || {};
function htmlbarsInlineCompilerPlugin(babel) {
let t = babel.types;
Function resolveAddonsTask
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
resolveAddonsTask: task(function *(addons, dependencies, emberVersion) {
let done = false;
while (!done) {
let addonPromises = {};
let addonNames = Object.keys(addons);
Function htmlbarsInlineCompilerPlugin
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function htmlbarsInlineCompilerPlugin(babel) {
let t = babel.types;
return {
visitor: {
Function testConfig
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function testConfig() {
this.get('/gists', function(schema) {
return schema.gists.all();
});
Function initializeColumns
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
initializeColumns() {
const files = this.get('model.files');
if (!files) {
return;
- 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 buildTwiddleVendorTree
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function buildTwiddleVendorTree() {
const funnel = require('broccoli-funnel');
const concat = require('broccoli-concat');
const mergeTrees = require('broccoli-merge-trees');
const babelTranspiler = require('broccoli-babel-transpiler');
Function didReceiveAttrs
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
didReceiveAttrs() {
if(!this.element) {
return;
}
- 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 getEmberCLIBlueprints
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getEmberCLIBlueprints() {
const fs = require('fs');
let fileMap = {};
let blueprintFiles = {
Function exports
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(deployTarget) {
var ENV = {
build: {
environment: 'production'
},