Showing 12 of 15 total issues
Function build_plugin_desc
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
function build_plugin_desc(spec, useopts, eraro) {
const plugin = spec.plugin
// Don't do much with plugin options, just ensure they are an object.
let options =
- 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 perform_require
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function perform_require(reqfunc, plugin_desc, builtin, level) {
const search_list = plugin_desc.search
let initfunc
let search
let found
- 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 build_plugin_desc
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function build_plugin_desc(spec, useopts, eraro) {
const plugin = spec.plugin
// Don't do much with plugin options, just ensure they are an object.
let options =
Function use_plugin_desc
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function use_plugin_desc(plugin_desc, useopts, eraro) {
plugin_desc.search = build_plugin_names(
plugin_desc.name,
useopts.builtin,
useopts.prefix,
- 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 use_plugin_desc
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function use_plugin_desc(plugin_desc, useopts, eraro) {
plugin_desc.search = build_plugin_names(
plugin_desc.name,
useopts.builtin,
useopts.prefix,
Function build_plugin_names
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function build_plugin_names() {
const args = BuildNameArgu(arguments)
const name = args.name
const isRelative = name.match(/^[./]/)
Function make
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function make(useopts) {
// Default options, overidden by caller supplied options.
useopts = Object.assign(
{
prefix: 'plugin-',
Function load_plugin
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function load_plugin(plugin_desc, start_module, eraro) {
let current_module = start_module
let builtin = true
let level = 0
let funcdesc = {}
Function perform_require
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function perform_require(reqfunc, plugin_desc, builtin, level) {
const search_list = plugin_desc.search
let initfunc
let search
let found
Function make
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function make(useopts) {
// Default options, overidden by caller supplied options.
useopts = Object.assign(
{
prefix: 'plugin-',
- 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 build_plugin_names
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function build_plugin_names() {
const args = BuildNameArgu(arguments)
const name = args.name
const isRelative = name.match(/^[./]/)
- 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 load_plugin
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function load_plugin(plugin_desc, start_module, eraro) {
let current_module = start_module
let builtin = true
let level = 0
let funcdesc = {}
- 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"