michielbdejong/solid-panes

View on GitHub

Showing 327 of 327 total issues

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

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

              if (unclassifiedIn.length) {
                tab = transactionTable(dom, unclassifiedIn)
                count = tab.children.length
                div.appendChild(dom.createElement('h3')).textContent =
                  'Unclassified Income' + (count < 4 ? '' : ' (' + count + ')')
        Severity: Major
        Found in src/transaction/period.js and 1 other location - About 2 hrs to fix
        src/transaction/period.js on lines 288..296

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

        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

              if (unclassifiedOut.length) {
                tab = transactionTable(dom, unclassifiedOut)
                count = tab.children.length
                div.appendChild(dom.createElement('h3')).textContent =
                  'Unclassified Outgoings' + (count < 4 ? '' : ' (' + count + ')')
        Severity: Major
        Found in src/transaction/period.js and 1 other location - About 2 hrs to fix
        src/transaction/period.js on lines 279..287

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

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

          Function licenseOptions has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
          Open

          module.exports = function licenseOptions () {
            this.options = {}
            this.references = []
            this.checkedLicenses = []
          
          
          Severity: Minor
          Found in src/outline/licenseOptions.js - About 2 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 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 (
          Severity: Major
          Found in src/defaultPane.js - About 2 hrs to fix

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

                var mention = function mention (message, style) {
                  if (style === undefined) style = 'color: grey'
                  var pre = dom.createElement('pre')
                  pre.setAttribute('style', style)
                  div.appendChild(pre)
            Severity: Major
            Found in src/transaction/pane.js and 1 other location - About 2 hrs to fix
            src/trip/tripPane.js on lines 49..55

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

            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 complain = function complain (message, style) {
                  if (style === undefined) style = 'color: grey'
                  var pre = myDocument.createElement('pre')
                  pre.setAttribute('style', style)
                  div.appendChild(pre)
            Severity: Major
            Found in src/trip/tripPane.js and 1 other location - About 2 hrs to fix
            src/transaction/pane.js on lines 44..50

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

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

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

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

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

                    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 = []
                    Severity: Major
                    Found in src/socialPane.js - About 2 hrs to fix

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

                        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,
                        Severity: Minor
                        Found in src/imagePane.js - About 2 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

                        Severity
                        Category
                        Status
                        Source
                        Language