michielbdejong/solid-panes

View on GitHub

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
Severity: Major
Found in src/outline/userInput.js - About 4 hrs to fix

    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#')
    Severity: Major
    Found in src/trip/tripPane.js - About 3 hrs to fix

      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
      Severity: Major
      Found in src/microblogPane/microblogPane.js - About 3 hrs to fix

        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)
        Severity: Minor
        Found in src/internal/internalPane.ts - About 3 hrs to fix

        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
        Severity: Major
        Found in src/outline/queryByExample.js - About 3 hrs to fix

          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) {
          Severity: Major
          Found in src/outline/manager.js - About 3 hrs to fix

            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) {
            Severity: Major
            Found in src/profile/editProfile.view.ts - About 3 hrs to fix

              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)
              Severity: Major
              Found in src/microblogPane/microblogPane.js - About 3 hrs to fix

                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',
                Severity: Minor
                Found in src/dokieli/dokieliPane.js - About 3 hrs to fix

                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.
                Severity: Minor
                Found in src/humanReadablePane.js - About 3 hrs to fix

                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
                Severity: Major
                Found in src/outline/manager.js - About 3 hrs to fix

                  Function statusUpdate has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      Microblog.prototype.statusUpdate = function (
                        statusMsg,
                        callback,
                        replyTo,
                        meta
                  Severity: Major
                  Found in src/microblogPane/microblogPane.js - About 3 hrs to fix

                    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)
                    Severity: Major
                    Found in src/socialPane.js - About 3 hrs to fix

                      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
                      Severity: Major
                      Found in src/outline/userInput.js - About 2 hrs to fix

                        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
                        Severity: Minor
                        Found in src/transaction/period.js - About 2 hrs to fix

                          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')
                          Severity: Major
                          Found in src/microblogPane/microblogPane.js - About 2 hrs to fix

                            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') {
                            Severity: Major
                            Found in src/outline/manager.js - About 2 hrs to fix

                              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) {
                              Severity: Major
                              Found in src/classInstancePane.js - About 2 hrs to fix

                                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')
                                Severity: Major
                                Found in src/dataContentPane.js - About 2 hrs to fix

                                  Function licenseOptions has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  module.exports = function licenseOptions () {
                                    this.options = {}
                                    this.references = []
                                    this.checkedLicenses = []
                                  
                                  
                                  Severity: Major
                                  Found in src/outline/licenseOptions.js - About 2 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language