Showing 11 of 11 total issues
Function createInlinePluginCreator
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createInlinePluginCreator(packages, multiContext, flags) {
// Vars.
const { cwd } = multiContext;
/**
- Create a ticketCreate a ticket
Function createInlinePlugin
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createInlinePlugin(pkg) {
// Vars.
const { plugins, dir, name } = pkg;
const debugPrefix = `[${name}]`;
- Create a ticketCreate a ticket
Function createInlinePluginCreator
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function createInlinePluginCreator(packages, multiContext, flags) {
// Vars.
const { cwd } = multiContext;
/**
- Read upRead up
- Create a ticketCreate a ticket
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 getDependentRelease
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getDependentRelease = (pkg, bumpStrategy, releaseStrategy, ignore, prefix) => {
const severityOrder = ["patch", "minor", "major"];
const { localDeps, manifest = {} } = pkg;
const lastVersion = pkg._lastRelease && pkg._lastRelease.version;
const { dependencies = {}, devDependencies = {}, peerDependencies = {}, optionalDependencies = {} } = manifest;
- Create a ticketCreate a ticket
Function getNextPreVersion
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getNextPreVersion = (pkg, tags) => {
const tagFilters = [pkg._preRelease];
// Note: this is only set is a current multi-semantic-release released
const lastVersionForCurrentRelease = pkg._lastRelease && pkg._lastRelease.version;
- Create a ticketCreate a ticket
Function getCommitsFiltered
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function getCommitsFiltered(cwd, dir, lastHead = undefined, firstParentBranch) {
// Clean paths and make sure directories exist.
check(cwd, "cwd: directory");
check(dir, "dir: path");
cwd = cleanPath(cwd);
- Create a ticketCreate a ticket
Function getNextPreVersion
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const getNextPreVersion = (pkg, tags) => {
const tagFilters = [pkg._preRelease];
// Note: this is only set is a current multi-semantic-release released
const lastVersionForCurrentRelease = pkg._lastRelease && pkg._lastRelease.version;
- Read upRead up
- Create a ticketCreate a ticket
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 difference
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const difference = (object, base) =>
transform(object, (result, value, key) => {
if (!isEqual(value, base[key])) {
result[key] =
isObject(value) && isObject(base[key]) ? difference(value, base[key]) : `${base[key]} → ${value}`;
- Read upRead up
- Create a ticketCreate a ticket
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 getManifest
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function getManifest(path) {
// Read the file.
const contents = readManifest(path);
// Parse the file.
- Read upRead up
- Create a ticketCreate a ticket
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 resolveNextVersion
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const resolveNextVersion = (currentVersion, nextVersion, strategy = "override", prefix = "") => {
// Check the next pkg version against its current references.
// If it matches (`*` matches to any, `1.1.0` matches `1.1.x`, `1.5.0` matches to `^1.0.0` and so on)
// release will not be triggered, if not `override` strategy will be applied instead.
if ((strategy === "satisfy" || strategy === "inherit") && semver.satisfies(nextVersion, currentVersion)) {
- Read upRead up
- Create a ticketCreate a ticket
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 getDependentRelease
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const getDependentRelease = (pkg, bumpStrategy, releaseStrategy, ignore, prefix) => {
const severityOrder = ["patch", "minor", "major"];
const { localDeps, manifest = {} } = pkg;
const lastVersion = pkg._lastRelease && pkg._lastRelease.version;
const { dependencies = {}, devDependencies = {}, peerDependencies = {}, optionalDependencies = {} } = manifest;
- Read upRead up
- Create a ticketCreate a ticket
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"