michielbdejong/solid-panes

View on GitHub

Showing 327 of 327 total issues

Function propertyTree has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function propertyTree (subject) {
      // print('Proprty tree for '+subject)
      var rep = myDocument.createElement('table')
      var lastPred = null
      var sts = subjects[sz.toStr(subject)] // relevant statements
Severity: Minor
Found in src/dataContentPane.js - About 1 hr to fix

    Function loadPadData has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        var loadPadData = function () {
          // @@ TODO Remove casting of fetcher
          ;(fetcher as any).nowOrWhenFetched(padDoc.uri, undefined, function (
            ok: boolean,
            body: string,
    Severity: Minor
    Found in src/pad/padPane.ts - About 1 hr to fix

      Function label has 43 lines of code (exceeds 25 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 1 hr to fix

        Function notificationsView has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            Pane.prototype.notificationsView = function (s, doc) {
              var postNotificationContainer = doc.createElement('div')
              postNotificationContainer.id = 'postNotificationContainer'
              postNotificationContainer.className =
                'notification-container view-container'
        Severity: Minor
        Found in src/microblogPane/microblogPane.js - About 1 hr to fix

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

                var insertedPane = function (context, subject, paneName) {
                  var p = context.session.paneRegistry.byName(paneName)
                  var d = p.render(subject, context)
                  d.setAttribute('style', 'border: 0.1em solid green;')
                  return d
          Severity: Major
          Found in src/transaction/period.js and 1 other location - About 1 hr to fix
          src/transaction/pane.js on lines 129..134

          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 69.

          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

              var mention = function complain (message, style) {
                var pre = dom.createElement('p')
                pre.setAttribute('style', style || 'color: grey; background-color: white')
                box.appendChild(pre).textContent = message
                return pre
          Severity: Major
          Found in src/form/pane.js and 1 other location - About 1 hr to fix
          src/ui/pane.js on lines 38..43

          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 69.

          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

              var mention = function complain (message, style) {
                var pre = dom.createElement('p')
                pre.setAttribute('style', style || 'color: grey; background-color: white')
                box.appendChild(pre).textContent = message
                return pre
          Severity: Major
          Found in src/ui/pane.js and 1 other location - About 1 hr to fix
          src/form/pane.js on lines 29..34

          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 69.

          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

              var insertedPane = function (context, subject, paneName) {
                var p = context.session.paneRegistry.byName(paneName)
                var d = p.render(subject, context)
                d.setAttribute('style', 'border: 0.1em solid green;')
                return d
          Severity: Major
          Found in src/transaction/pane.js and 1 other location - About 1 hr to fix
          src/transaction/period.js on lines 128..133

          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 69.

          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 globalAppTabs has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            async function globalAppTabs (options = {}) {
              console.log('globalAppTabs @@')
              const div = dom.createElement('div')
              const me = UI.authn.currentUser()
              if (!me) {
          Severity: Minor
          Found in src/outline/manager.js - About 1 hr to fix

            Function onDragStart has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              onDragStart: function (x, y, td) {
                /* seeAlso nsDragAndDrop.js::nsDragAndDrop.startDrag */
                // ToDo for myself: understand the connections in firefox, x, screenX
            
                this.dragTarget = td
            Severity: Minor
            Found in src/outline/dragDrop.js - About 1 hr to fix

              Function doRender has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  async function doRender (
                    container: HTMLElement,
                    subject: NamedNode | null,
                    dom: HTMLDocument
                  ) {
              Severity: Minor
              Found in src/profile/profile.view.ts - About 1 hr to fix

                Function moveOn has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    var moveOn = function (current, level) {
                      return new Promise(function (resolve) {
                        level = level || 0
                        if (!options.chain) return resolve(null)
                        // Ideally navigate graph else cheat with URI munging:
                Severity: Minor
                Found in src/audio/audioPane.js - About 1 hr to fix

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

                      for (i = 0; i < this.listeners.length; i++) {
                        if (this.listeners[i] !== null) {
                          this.listeners[i].removeQuery(q)
                        }
                      }
                  Severity: Major
                  Found in src/outline/queryByExample.js and 1 other location - About 1 hr to fix
                  src/outline/queryByExample.js on lines 245..249

                  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 67.

                  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 reallyDelete has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          var reallyDelete = function () {
                            // callback after deletion
                            var mbconfirmDeletePost = function (a, success) {
                              if (success) {
                                that.notify('Post deleted.')
                  Severity: Minor
                  Found in src/microblogPane/microblogPane.js - About 1 hr to fix

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

                        for (i = 0; i < this.queries.length; i++) {
                          if (this.queries[i] !== null) {
                            listener.addQuery(this.queries[i])
                          }
                        }
                    Severity: Major
                    Found in src/outline/queryByExample.js and 1 other location - About 1 hr to fix
                    src/outline/queryByExample.js on lines 289..293

                    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 67.

                    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

                        for (i = 0; i < this.queries.length; i++) {
                          if (this.queries[i] !== null) {
                            listener.removeQuery(this.queries[i])
                          }
                        }
                    Severity: Major
                    Found in src/outline/queryByExample.js and 1 other location - About 1 hr to fix
                    src/outline/queryByExample.js on lines 277..281

                    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 67.

                    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 setACL2 has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          var setACL2 = function setACL2 (docURI, allWrite, callbackFunction) {
                            var aclDoc = kb.any(
                              kb.sym(docURI),
                              kb.sym('http://www.iana.org/assignments/link-relations/acl')
                            ) // @@ check that this get set by web.js
                    Severity: Minor
                    Found in src/schedule/schedulePane.js - About 1 hr to fix

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

                              if (s.indexOf('.') >= 0) {
                                return s.split('.')[0] + '.' + (s.split('.')[1] + '00').slice(0, 2)
                              }
                      Severity: Major
                      Found in src/transaction/period.js and 1 other location - About 1 hr to fix
                      src/transaction/pane.js on lines 95..97

                      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 67.

                      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 setACL has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          var setACL = function setACL (
                            docURI: string,
                            allWrite: boolean,
                            callbackFunction: Function
                          ) {
                      Severity: Minor
                      Found in src/pad/padPane.ts - About 1 hr to fix

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

                            for (i = 0; i < this.listeners.length; i++) {
                              if (this.listeners[i] !== null) {
                                this.listeners[i].addQuery(q)
                              }
                            }
                        Severity: Major
                        Found in src/outline/queryByExample.js and 1 other location - About 1 hr to fix
                        src/outline/queryByExample.js on lines 258..262

                        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 67.

                        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