src/dataContentPane.js
Function statementsAsTables
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
statementsAsTables: function statementsAsTables (sts, context, initialRoots) {
var myDocument = context.dom
// var outliner = context.getOutliner(myDocument)
var rep = myDocument.createElement('table')
var sz = UI.rdf.Serializer(context.session.store)
Function statementsAsTables
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
Open
statementsAsTables: function statementsAsTables (sts, context, initialRoots) {
var myDocument = context.dom
// var outliner = context.getOutliner(myDocument)
var rep = myDocument.createElement('table')
var sz = UI.rdf.Serializer(context.session.store)
- 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 objectTree
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function objectTree (obj) {
var res, anchor
switch (obj.termType) {
case 'NamedNode':
anchor = myDocument.createElement('a')
Function render
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render: function (subject, context) {
var myDocument = context.dom
function alternativeRendering () {
var sz = UI.rdf.Serializer(context.session.store)
Function propertyTree
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function propertyTree (subject) {
// print('Proprty tree for '+subject)
var rep = myDocument.createElement('table')
var lastPred = null
var sts = subjects[sz.toStr(subject)] // relevant statements
Function render
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
render: function (subject, context) {
var myDocument = context.dom
function alternativeRendering () {
var sz = UI.rdf.Serializer(context.session.store)
- 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
Avoid too many return
statements within this function. Open
Open
return newTable
Avoid too many return
statements within this function. Open
Open
return res
Avoid too many return
statements within this function. Open
Open
return anchor
Avoid too many return
statements within this function. Open
Open
return res
Avoid too many return
statements within this function. Open
Open
return res