Showing 270 of 337 total issues
Avoid too many return
statements within this function. Open
return { pred: 'agentClass', obj: obj }
Avoid too many return
statements within this function. Open
return { pred: 'origin', obj: obj }
Avoid too many return
statements within this function. Open
return null
Function _trySetImage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
buttons._trySetImage = function _trySetImage (element, thing, iconForClassMap) {
const kb = UI.store
const explitImage = buttons.findImage(thing)
if (explitImage) {
- 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 getEyeFocus
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function getEyeFocus (element, instantly, isBottom, myWindow) {
if (!myWindow) myWindow = window
var elementPosY = findPos(element)[1]
var totalScroll = elementPosY - 52 - myWindow.scrollY // magic number 52 for web-based version
if (instantly) {
- 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 personTR
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
buttons.personTR = function (dom, pred, obj, options) {
var tr = dom.createElement('tr')
options = options || {}
// tr.predObj = [pred.uri, obj.uri] moved to acl-control
var td1 = tr.appendChild(dom.createElement('td'))
- 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 toJS
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function toJS (term) {
if (!term.datatype) return term // Objects remain objects
if (term.datatype.equals(ns.xsd('boolean'))) {
return term.value === '1'
}
- 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 defaultAnnotationStore
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
buttons.defaultAnnotationStore = function (subject) {
if (subject.uri === undefined) return undefined
var s = subject.uri
if (s.slice(0, 7) !== 'http://') return undefined
s = s.slice(7) // Remove
- 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 makeSelectForNestedCategory
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
forms.makeSelectForNestedCategory = function (
dom,
kb,
subject,
category,
- 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 booleanField
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function booleanField (
dom,
container,
already,
subject,
- 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"