Showing 243 of 327 total issues
Function licenseOptions
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function licenseOptions () {
this.options = {}
this.references = []
this.checkedLicenses = []
- 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 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function (subject, context) {
var dom = context.dom
var filter = function (pred, inverse) {
if (
Function DDM
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
dragAndDrop.util.DDM = (function DDM () {
return {
handleMouseDown: function (e, oDD) {
// this.currentTarget = dragAndDrop.util.Event.getTarget(e)
- 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 19 (exceeds 5 allowed). Consider refactoring. Open
render: function (subject, context) {
const myDocument = context.dom
function isVideo (src, _index) {
if (!src) {
return {
- 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 19 (exceeds 5 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) {
- 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 boxHandler
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
var boxHandler = function (_e) {
tx.className = 'pendingedit'
// alert('Should be greyed out')
if (this.checked) {
// Add link
Function getDashboardItems
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function getDashboardItems () {
const me = UI.authn.currentUser()
const div = dom.createElement('div')
const [books, pods] = await Promise.all([getAddressBooks(), getPods()])
return [
Function walk
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.walk = function walk (directionCode, inputTd) {
var selectedTd = inputTd || selection[0]
var newSelTd
switch (directionCode) {
case 'down':
Function lsCreateNewMB
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
var lsCreateNewMB = function (_evt) {
// disable the create new microblog button.
// then prefills the information.
xcreateNewMB.disabled = true
var xcmb = doc.createElement('div')
Function triageFriends
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
function triageFriends (s) {
outgoing = kb.each(s, foaf('knows'))
incoming = kb.each(undefined, foaf('knows'), s) // @@ have to load the friends
var confirmed = []
var unconfirmed = []
Function DDM
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
dragAndDrop.util.DDM = (function DDM () {
return {
handleMouseDown: function (e, oDD) {
// this.currentTarget = dragAndDrop.util.Event.getTarget(e)
Function label
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
label: function (subject, context) {
var kb = context.session.store
if (
!kb.anyStatementMatching(
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"
Further reading
Function render
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: (subject, context) => {
const dom = context.dom
const store = context.session.store
function complainIfBad (ok: Boolean, mess: any) {
Function render
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function (subject, context) {
const store = context.session.store
async function doRender (
container: HTMLElement,
Function render
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function (subject, context) {
var myDocument = context.dom
function alternativeRendering () {
var sz = UI.rdf.Serializer(context.session.store)
Function appendAccessIcon
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.appendAccessIcon = function (node, uri) {
if (!uri) return ''
var docuri = UI.rdf.uri.docpart(uri)
if (docuri.slice(0, 5) !== 'http:') return ''
var state = sf.getState(docuri)
Function lsFollowUser
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lsFollowUser () {
var myUser = kb.sym(mb.getMyURI())
// var Ifollow = that.Ifollow
var username = that.creator.name
var mbconfirmFollow = function (uri, success, _msg) {
Function renderTrip
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
var renderTrip = function renderTrip (subject, thisDiv) {
var query = new $rdf.Query(UI.utils.label(subject))
var vars = ['date', 'transaction', 'comment', 'type', 'in_USD']
var v = {}
vars.map(function (x) {
Function mintNew
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
mintNew: function (context, newPaneOptions) {
var kb = context.session.store
var newInstance = newPaneOptions.newInstance
if (!newInstance) {
let uri = newPaneOptions.newBase
Function outlinePredicateTD
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.outlinePredicateTD = function outlinePredicateTD (
predicate,
newTr,
inverse,
internal