Showing 270 of 337 total issues
Function loadController
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
doc: NamedNode,
kb: IndexedFormula,
subject: NamedNode,
noun: string,
context: DataBrowserContext,
Function toggleBookmark
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export async function toggleBookmark (userContext, target, bookmarkButton) {
await kb.fetcher.load(userContext.bookmarkDocument)
const bookmarks = kb.each(
null,
BOOK('recalls'),
- 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 matrixForQuery
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
dom,
query,
vx,
vy,
vvalue,
Function basicField
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
dom,
container,
already,
subject,
form,
Function appendForm
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
dom,
container,
already,
subject,
form,
Function sentimentButton
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
context,
target,
icon,
actionClass,
doc,
Avoid deeply nested control flow statements. Open
if (obj.toString() !== orig.toString()) {
different = true
}
Function askName
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
buttons.askName = function (dom, kb, container, predicate, klass, noun) {
Function manageParticipation
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
dom,
container,
padDoc,
subject,
me,
Function predicateLabelForXML
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function predicateLabelForXML (p, inverse) {
var lab
if (inverse) {
// If we know an inverse predicate, use its label
var ip = UI.store.any(p, UI.ns.owl('inverseOf'))
- 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 renderPartipants
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
UI.pad.renderPartipants = function (dom, table, padDoc, subject, me, options) {
Function findAppInstances
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export async function findAppInstances (
context: AuthenticationContext,
klass: $rdf.NamedNode,
isPublic: boolean
): Promise<AuthenticationContext> {
- 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 makeACLGraphbyCombo
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
kb: $rdf.IndexedFormula,
x: $rdf.NamedNode,
byCombo: ComboList,
aclDoc: $rdf.NamedNode,
main?: boolean,
Avoid deeply nested control flow statements. Open
for (p in possibleProperties.dp) possible.push(kb.fromNT(p))
Avoid deeply nested control flow statements. Open
if (!b[pred][agent] || !b[pred][agent][mode]) {
return false
}
Avoid deeply nested control flow statements. Open
if (!b[pred][ag]) b[pred][ag] = []
Function makeSelectForNestedCategory
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
dom,
kb,
subject,
category,
store,
Function attachmentList
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
buttons.attachmentList = function (dom, subject, div, options) {
options = options || {}
var doc = options.doc || subject.doc()
if (options.modify === undefined) options.modify = true
var modify = options.modify
- 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 makeDescription
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
dom,
kb,
subject,
predicate,
store,
Function makeSelectForCategory
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
dom,
kb,
subject,
category,
store,