Showing 13 of 70 total issues
File plugin-registry-test.js
has 566 lines of code (exceeds 250 allowed). Consider refactoring. Open
var expect = require('../../helpers/expect');
var PluginRegistry = require('../../../lib/models/plugin-registry');
var logOutput, mockUi;
Function _buildDisabledMap
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
_buildDisabledMap: function(aliasMap, config) {
var aliases = this._flattenAliasMap(aliasMap);
var allExcept = null;
if (typeof config.allExcept !== 'undefined') {
- 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 run
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
run: function(commandOptions, rawArgs) {
commandOptions.deployTarget = rawArgs.shift();
this.ui.verbose = chooseOptionValue(commandOptions.verbose, this.settings, 'verbose');
this.ui.logInfoColor = chooseOptionValue(commandOptions.logInfoColor, this.settings, 'logInfoColor', 'blue');
Function run
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
run: function(commandOptions, rawArgs) {
commandOptions.deployTarget = rawArgs.shift();
commandOptions.deployConfigFile = chooseOptionValue(commandOptions.deployConfigFile, this.settings, 'deploy-config-file', 'config/deploy.js');
this.ui.verbose = chooseOptionValue(commandOptions.verbose, this.settings, 'verbose');
Function _buildRunOrderMap
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
_buildRunOrderMap: function(config, aliasMap, pluginInstances) {
var self = this;
pluginInstances.forEach(function(instance) {
if (instance.runBefore) {
Function _buildDisabledMap
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
_buildDisabledMap: function(aliasMap, config) {
var aliases = this._flattenAliasMap(aliasMap);
var allExcept = null;
if (typeof config.allExcept !== 'undefined') {
Function postBuild
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
postBuild: function(result) {
var _this = this;
if (!this.app) {
// You will need ember-cli >= 1.13 to use ember-cli-deploy's postBuild integration.
// This is because prior to 1.13, `this.app` is not available in the postBuild hook.
Function run
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
run: function(commandOptions, rawArgs) {
commandOptions.deployTarget = rawArgs.shift();
commandOptions.deployConfigFile = chooseOptionValue(commandOptions.deployConfigFile, this.settings, 'deploy-config-file', 'config/deploy.js');
commandOptions.activate = chooseOptionValue(commandOptions.activate, this.settings, 'activate');
Function _mergeAuthorProvidedOrderWithConfigOrder
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
_mergeAuthorProvidedOrderWithConfigOrder: function(type, instanceName, names, config, aliasMap) {
Function _addPluginHookExecutionPromiseToHookPromiseChain
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Pipeline.prototype._addPluginHookExecutionPromiseToHookPromiseChain = function(ui, context, hookName, promise, fnObject) {
Function init
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
init: function() {
if (this._super.init) {
this._super.init.apply(this, arguments);
}
- 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 _registerPipelineHooks
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_registerPipelineHooks: function(deployPlugin) {
this._pipeline.hookNames().forEach(function(hookName) {
var fn = deployPlugin[hookName];
if (typeof fn !== 'function') {
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 init
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
init: function(project, ui, config) {
this._super();
this._project = project;
this._ui = ui;
this._aliasConfig = (config.pipeline && config.pipeline.alias) || {};
- 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"