Showing 243 of 327 total issues
File socialPane.js
has 426 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Social Pane
**
** This outline pane provides social network functions
** Using for example the FOAF ontology.
** Goal: A *distributed* version of facebook, advogato, etc etc
File padPane.ts
has 423 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { authn, icons, ns, pad, widgets } from 'solid-ui'
// @@ TODO: serialize is not part rdflib type definitions
// Might be fixed in https://github.com/linkeddata/rdflib.js/issues/341
// @ts-ignore
import { graph, log, NamedNode, Namespace, sym, serialize, UpdateManager, Fetcher } from 'rdflib'
Function statementsAsTables
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. 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 mintNew
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
mintNew: function (context, options) {
return new Promise(function (resolve, reject) {
var ns = UI.ns
var kb = context.session.store
var newBase = options.newBase
- 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 render
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function (subject, context) {
const kb = context.session.store
const dom = context.dom
var options = {
autoplay: false,
Function OutlinerKeypressPanel
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.OutlinerKeypressPanel = function OutlinerKeypressPanel (e) {
UI.log.info('Key ' + e.keyCode + ' pressed')
function showURI (about) {
if (about && dom.getElementById('UserURI')) {
Function render
has 134 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function (subject, context) {
const kb = context.session.store
const dom = context.dom
var mention = function complain (message, style) {
File attachPane.js
has 388 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* Attachment Pane
**
** - Attach a document to a thing
** - View attachments
** - Look at all unattached Supporting Documents.
Function generateNewMB
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
Microblog.prototype.generateNewMB = function (id, name, avatar, loc) {
var host = loc + '/' + id
var rememberMicroblog = function () {
UI.preferences.set('acct', host + '#' + id)
}
Function render
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
render: function (subject, context) {
const kb = context.session.store
const dom = context.dom
var options = {
autoplay: false,
- 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 createApplicationEntry
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createApplicationEntry (
subject: NamedNode,
origin: NamedNode | null,
appModes: NamedNode[],
updateTable: () => void
Function renderPaneIconTray
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function renderPaneIconTray (td, options = {}) {
const paneShownStyle =
'width: 24px; border-radius: 0.5em; border-top: solid #222 1px; border-left: solid #222 0.1em; border-bottom: solid #eee 0.1em; border-right: solid #eee 0.1em; margin-left: 1em; padding: 3px; background-color: #ffd;'
const paneHiddenStyle =
'width: 24px; border-radius: 0.5em; margin-left: 1em; padding: 3px'
Function Refill
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Refill: function Refill (e, selectedTd) {
UI.log.info('Refill' + selectedTd.textContent)
var isPredicate = selectedTd.nextSibling
var predicateQuery
if (isPredicate) {
Function initializeNewInstanceAtBase
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
var initializeNewInstanceAtBase = function (
thisInstance: any,
newBase: string
) {
var here = sym(thisInstance.uri.split('#')[0])
Function QuerySource
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
function QuerySource () {
/**
* stores all of the queries currently held by this source,
* indexed by ID number.
*/
- 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 render
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function (subject, context) {
const myDocument = context.dom
function isVideo (src, _index) {
if (!src) {
return {
Function calculations
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
var calculations = function () {
var total = {}
var yearTotal = {}
var yearCategoryTotal = {}
var trans = kb.each(undefined, TRIP('trip'), subject)
Function showNobj
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
tr.showNobj = function (n) {
var predDups = k - dups
var show = 2 * n < predDups ? n : predDups
var showLaterArray = []
if (predDups !== 1) {
Function makeQueryRow
has a Cognitive Complexity of 28 (exceeds 5 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
- 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 render
has a Cognitive Complexity of 28 (exceeds 5 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#')
- 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"