Showing 78 of 160 total issues
Function getConfig
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
getConfig(validate = true) {
if (!this.config) {
try {
delete require.cache[require.resolve(this.configPath)];
// eslint-disable-next-line global-require
- 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 setupSwarm
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export async function setupSwarm(api) {
const config = api.getConfig();
if (!api.swarmEnabled()) {
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 copy
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function copy(session, _options, callback) {
const options = clone(_options);
let retries = 0;
if (typeof options.hostVars === 'object' && options.hostVars[session._host]) {
- 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 runTaskList
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function runTaskList(list, sessions, opts) {
if (opts && opts.verbose) {
addStdioHandlers(list);
delete opts.verbose;
}
Function getSettingsFromPath
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
getSettingsFromPath(settingsPath) {
const filePath = resolvePath(settingsPath);
let settings;
try {
Function checkCompatible
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export async function checkCompatible(registryConfig) {
try {
const host = getHost(registryConfig);
await axios.get(`https://${host}/v2`);
log(host);
Function shell
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function shell(api) {
const config = api.getConfig();
const mongoServer = Object.keys(config.mongo.servers)[0];
const server = config.servers[mongoServer];
Function copy
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function copy(session, _options, callback) {
const options = clone(_options);
let retries = 0;
if (typeof options.hostVars === 'object' && options.hostVars[session._host]) {
Function start
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
export async function start(api) {
log('exec => mup meteor start');
const config = api.getConfig().app;
const swarmEnabled = api.swarmEnabled();
Function validateConfig
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
validateConfig(configPath, logProblems) {
// Only print errors once.
if (this.validationErrors.length > 0) {
return this.validationErrors;
}
Function prepareConfig
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function prepareConfig(config) {
if (!config.app || !config.proxy) {
return config;
}
Function checkCompatible
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export async function checkCompatible(registryConfig) {
try {
const host = getHost(registryConfig);
await axios.get(`https://${host}/v2`);
log(host);
- 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 prepareConfig
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function prepareConfig(config) {
if (!config.app || !config.proxy) {
return config;
}
- 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 debugApp
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export async function debugApp(api) {
const {
servers,
app
} = api.getConfig();
- 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 scrubConfig
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function scrubConfig(config, utils) {
if (config.meteor) {
delete config.meteor;
}
- 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 registerPlugin
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function registerPlugin(plugin) {
if (plugin.module.commands) {
Object.keys(plugin.module.commands).forEach(key => {
registerCommand(plugin.name, key, plugin.module.commands[key]);
});
- 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 default
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export default function(
config,
{
addDepreciation,
combineErrorDetails,
- 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 envconfig
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function envconfig(api) {
log('exec => mup meteor envconfig');
const {
servers,
app,
- 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 newerStable
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function newerStable(local, remote) {
for (let i = 0; i < 3; i++) {
for (let sameIndex = 0; sameIndex < i; sameIndex += 1) {
if (local[sameIndex] !== remote[sameIndex]) {
return false;
- 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 statusColor
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
versionCorrect,
distributionCorrect,
hasAptGet,
defaultBash,
_overallColor