Showing 8 of 8 total issues
Function main
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public async main() {
commander.option('-i, --install', 'installs the plugins')
commander.option('-r, --run', 'runs node')
commander.option('-f, --fetch <string>', 'fetch from url')
commander.parse(process.argv)
Function main
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function main(argv) {
const optionalArg = argv.length >= 3 ? argv[2] : undefined
try {
console.log(pidFolder)
Function resolveSinglePlugin
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private async resolveSinglePlugin(plugin: IXyoPluginWithConfig) {
const pluginDependencies = plugin.plugin.getPluginDependencies()
let hasAllDependencies = true
// loop through all of the resolved dependencies, to see if it has the dependencies
Function installNpmRepository
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
const installNpmRepository = (
pathOfNpm: string,
subPlugins: INpmRemoteSubPluginConfig[]
) => {
const xyoPlugins: string[] =
Function main
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
async function main(argv) {
const optionalArg = argv.length >= 3 ? argv[2] : undefined
try {
console.log(pidFolder)
- 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 resolveSinglePlugin
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private async resolveSinglePlugin(plugin: IXyoPluginWithConfig) {
const pluginDependencies = plugin.plugin.getPluginDependencies()
let hasAllDependencies = true
// loop through all of the resolved dependencies, to see if it has the dependencies
- 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 installNpmRepository
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const installNpmRepository = (
pathOfNpm: string,
subPlugins: INpmRemoteSubPluginConfig[]
) => {
const xyoPlugins: string[] =
- 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 resolve
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public async resolve(plugins: IXyoPluginWithConfig[]) {
// while we are still resolving plugins
while (this.lastResolvedPluginCount !== this.resolvedPluginCount) {
this.lastResolvedPluginCount = this.resolvedPluginCount
- 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"