michielbdejong/solid-panes

View on GitHub

Showing 327 of 327 total issues

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

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                    var notify = function (messageString) {
                      var xmsg = doc.createElement('li')
                      xmsg.className = 'notify'
                      xmsg.innerHTML = messageString
                      doc.getElementById('notify-container').appendChild(xmsg)
              Severity: Major
              Found in src/microblogPane/microblogPane.js and 1 other location - About 3 hrs to fix
              src/microblogPane/microblogPane.js on lines 545..554

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 97.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                  Pane.prototype.notify = function (messageString) {
                    var xmsg = doc.createElement('li')
                    xmsg.className = 'notify'
                    xmsg.innerHTML = messageString
                    doc.getElementById('notify-container').appendChild(xmsg)
              Severity: Major
              Found in src/microblogPane/microblogPane.js and 1 other location - About 3 hrs to fix
              src/microblogPane/microblogPane.js on lines 613..622

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 97.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                  var hasContentTypeIn2 = function (kb, x, displayables) {
                    var t = kb.findTypeURIs(subject)
                    for (var k = 0; k < displayables.length; k++) {
                      if ($rdf.Util.mediaTypeClass(displayables[k]).uri in t) {
                        return true
              Severity: Major
              Found in src/humanReadablePane.js and 1 other location - About 3 hrs to fix
              src/dokieli/dokieliPane.js on lines 49..57

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 96.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                  var hasContentTypeIn2 = function (kb, x, displayables) {
                    var t = kb.findTypeURIs(subject)
                    for (var k = 0; k < displayables.length; k++) {
                      if ($rdf.Util.mediaTypeClass(displayables[k]).uri in t) {
                        return true
              Severity: Major
              Found in src/dokieli/dokieliPane.js and 1 other location - About 3 hrs to fix
              src/humanReadablePane.js on lines 45..53

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 96.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              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

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                                      try {
                                        paneDiv = pane.render(subject, context, options)
                                      } catch (e) {
                                        // Easier debugging for pane developers
                                        paneDiv = dom.createElement('div')
                  Severity: Major
                  Found in src/outline/manager.js and 1 other location - About 2 hrs to fix
                  src/outline/manager.js on lines 821..831

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 94.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                            try {
                              UI.log.info('outline: Rendering pane (1): ' + tr1.firstPane.name)
                              paneDiv = tr1.firstPane.render(subject, context, options)
                            } catch (e) {
                              // Easier debugging for pane developers
                  Severity: Major
                  Found in src/outline/manager.js and 1 other location - About 2 hrs to fix
                  src/outline/manager.js on lines 644..655

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 94.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  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

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                        label: function (subject, context) {
                          const store = context.session.store
                          if (
                            'http://www.w3.org/2007/ont/link#ProtocolEvent' in
                            store.findTypeURIs(subject)
                      Severity: Major
                      Found in src/RDFXMLPane.js and 1 other location - About 2 hrs to fix
                      src/n3Pane.js on lines 17..29

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 93.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                        label: function (subject, context) {
                          var store = context.session.store
                          if (
                            'http://www.w3.org/2007/ont/link#ProtocolEvent' in
                            store.findTypeURIs(subject)
                      Severity: Major
                      Found in src/n3Pane.js and 1 other location - About 2 hrs to fix
                      src/RDFXMLPane.js on lines 18..31

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 93.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Severity
                      Category
                      Status
                      Source
                      Language