Showing 22 of 70 total issues
File try-each-test.js
has 637 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
const expect = require('chai').expect;
const tmp = require('tmp-sync');
const path = require('path');
File npm-adapter-test.js
has 530 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
let expect = require('chai').expect;
let RSVP = require('rsvp');
let fs = require('fs-extra');
File pnpm-adapter-test.js
has 523 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
let chai = require('chai');
let chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
File workspace-adapter-test.js
has 406 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
let expect = require('chai').expect;
let RSVP = require('rsvp');
let fs = require('fs-extra');
Function exports
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = async function () {
return {
scenarios: [
{
name: 'ember-lts-3.28',
Function _install
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
async _install(depSet) {
let mgrOptions = this.managerOptions || [];
let cmd = this.useYarnCommand ? 'yarn' : 'npm';
// buildManagerOptions overrides all default
- 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 generateFromConfig
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
generateFromConfig(config, root) {
let hasNpm = false;
let hasBower = false;
let adapters = [];
if (!config || !config.scenarios) {
Function run
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
async run(scenarios, options) {
// Required lazily to improve startup speed.
let ScenarioManager = require('./../utils/scenario-manager');
let DependencyManagerAdapterFactory = require('./../utils/dependency-manager-adapter-factory');
this.ResultSummary = require('./../utils/result-summary');
Function _printDependencyTable
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
_printDependencyTable(dependencyStatus) {
if (!dependencyStatus.length) {
return;
}
let task = this;
Function init
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
init() {
this._super.apply(this, arguments);
this.run = this.run || require('../utils/run');
if (!this.useYarnCommand) {
Function print
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
print() {
let task = this;
let colorAndMessage;
let failMessage;
let countPassed = 0;
Function _runCommandForThisScenario
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
async _runCommandForThisScenario(scenario) {
if (this._canceling) {
return;
}
Function getBaseConfig
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
async function getBaseConfig(options) {
let relativeConfigPath = options.configPath || getConfigPath(options.project);
let configPath = path.join(options.project.root, relativeConfigPath);
let data;
- 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 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
async run(commandOptions, rawArgs) {
let scenarioName = rawArgs[0];
debug('Scenario argument: %s', scenarioName);
debug('Command options:\n', commandOptions);
Function getBaseConfig
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function getBaseConfig(options) {
let relativeConfigPath = options.configPath || getConfigPath(options.project);
let configPath = path.join(options.project.root, relativeConfigPath);
let data;
Function _install
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
_install(depSet) {
let mgrOptions = this.managerOptions || [];
// buildManagerOptions overrides all default
if (typeof this.buildManagerOptions === 'function') {
- 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 _install
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
async _install(depSet) {
let mgrOptions = this.managerOptions || [];
// buildManagerOptions overrides all default
if (typeof this.buildManagerOptions === 'function') {
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
init() {
this._super.apply(this, arguments);
this.run = this.run || require('../utils/run');
if (!this.useYarnCommand) {
- 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 _overridePackageJSONDependencies
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
_overridePackageJSONDependencies(packageJSON, depSet, kindOfDependency) {
if (!depSet[kindOfDependency]) {
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 exports
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
module.exports = async function (root, commandArgs, opts) {
let options = Object.assign({ cwd: root }, opts);
let [command, ...actualArgs] = commandArgs;
try {
- 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"