Showing 243 of 327 total issues
Function insertTermTo
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
insertTermTo: function insertTermTo (selectedTd, term, isObject) {
switch (selectedTd.className) {
case 'undetermined selected':
var defaultpropview = this.views.defaults[
selectedTd.parentNode.AJAR_statement.predicate.uri
Function render
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function (subject, context) {
const myDocument = context.dom
var kb = context.store
var ns = UI.ns
var CAL = $rdf.Namespace('http://www.w3.org/2002/12/cal/ical#')
Function mbSubmitPost
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
var mbSubmitPost = function () {
var meta = {
recipients: []
}
// user has selected a microblog to post to
Function render
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
render: function (subject, context) {
const dom = context.dom
const store = context.session.store
const canonizedSubject = store.canon(subject)
const types = store.findTypeURIs(canonizedSubject)
- 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 makeQueryRow
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
function makeQueryRow (q, tr, constraint) {
var kb = UI.store
// predtr = predParentOf(tr)
// var nodes = tr.childNodes
// var n = tr.childNodes.length
Function listen
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
var listen = function (ico, pane) {
// Freeze scope for event time
ico.addEventListener(
'click',
function (event) {
Function render
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function (subject, context) {
const dom = context.dom
const store = context.session.store
function complainIfBad (ok: Boolean, mess: any) {
Function mbDeletePost
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
var mbDeletePost = function (evt) {
var lsconfirmNo = function () {
doc
.getElementById('notify-container')
.removeChild(xconfirmDeletionDialog)
Function label
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
label: function (subject, context) {
var kb = context.session.store
var ns = UI.ns
var allowed = [
// 'text/plain',
- 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 label
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
label: function (subject, context) {
var kb = context.session.store
var ns = UI.ns
// See also the source pane, which has lower precedence.
- 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 outlineObjectTD
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.outlineObjectTD = function outlineObjectTD (
obj,
view,
deleteNode,
statement
Function statusUpdate
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Microblog.prototype.statusUpdate = function (
statusMsg,
callback,
replyTo,
meta
Function buildCheckboxForm
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
var buildCheckboxForm = function (lab, statement, state) {
var f = dom.createElement('form')
var input = dom.createElement('input')
f.appendChild(input)
var tx = dom.createTextNode(lab)
Function deleteTriple
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
deleteTriple: function deleteTriple (selectedTd, isBackOut) {
// ToDo: complete deletion of a node
UI.log.debug('deleteTriple entered')
// allow a pending node to be deleted if it's a backout sent by SPARQL update callback
File period.js
has 289 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Financial Period Pane
**
** This outline pane allows a user to interact with a period
** downloaded from a bank statement, annotting it with classes and comments,
** trips, etc
Function Pane
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Pane = function (s, doc, microblogPane) {
var TabManager = function (doc) {
this.tablist = {}
this.doc = doc
this.tabView = doc.createElement('ul')
Function viewAsBoringDefault
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
function viewAsBoringDefault (obj) {
// UI.log.debug('entered viewAsBoringDefault...');
var rep // representation in html
if (obj.termType === 'Literal') {
Function render
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function (subject, context) {
var dom = context.dom
var outliner = context.getOutliner(dom)
var kb = context.session.store
var complain = function complain (message, color) {
Function objectTree
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function objectTree (obj) {
var res, anchor
switch (obj.termType) {
case 'NamedNode':
anchor = myDocument.createElement('a')
Function licenseOptions
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function licenseOptions () {
this.options = {}
this.references = []
this.checkedLicenses = []