michielbdejong/solid-panes

View on GitHub

Showing 243 of 327 total issues

Function exports has a Cognitive Complexity of 699 (exceeds 5 allowed). Consider refactoring.
Open

module.exports = function (context) {
  const dom = context.dom

  this.document = context.dom
  this.outlineIcons = outlineIcons
Severity: Minor
Found in src/outline/manager.js - About 2 wks 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 exports has 1847 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function (context) {
  const dom = context.dom

  this.document = context.dom
  this.outlineIcons = outlineIcons
Severity: Major
Found in src/outline/manager.js - About 1 wk to fix

    Function UserInput has a Cognitive Complexity of 444 (exceeds 5 allowed). Consider refactoring.
    Open

    module.exports = function UserInput (outline) {
      var kb = UI.store
    
      var myDocument = outline.document // is this ok?
      // UI.log.warn("myDocument when it's set is "+myDocument.location);
    Severity: Minor
    Found in src/outline/userInput.js - About 1 wk 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 UserInput has 1799 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function UserInput (outline) {
      var kb = UI.store
    
      var myDocument = outline.document // is this ok?
      // UI.log.warn("myDocument when it's set is "+myDocument.location);
    Severity: Major
    Found in src/outline/userInput.js - About 1 wk to fix

      Function render has a Cognitive Complexity of 330 (exceeds 5 allowed). Consider refactoring.
      Open

        render: function (s, doc) {
          //* **********************************************
          // NAMESPACES  SECTION
          //* **********************************************
          var SIOC = UI.rdf.Namespace('http://rdfs.org/sioc/ns#')
      Severity: Minor
      Found in src/microblogPane/microblogPane.js - About 6 days 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 1198 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        render: function (s, doc) {
          //* **********************************************
          // NAMESPACES  SECTION
          //* **********************************************
          var SIOC = UI.rdf.Namespace('http://rdfs.org/sioc/ns#')
      Severity: Major
      Found in src/microblogPane/microblogPane.js - About 5 days to fix

        File manager.js has 1856 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /* -*- coding: utf-8-dos -*-
           Outline Mode Manager
        */
        var panes = require('pane-registry')
        const $rdf = require('rdflib')
        Severity: Major
        Found in src/outline/manager.js - About 5 days to fix

          File userInput.js has 1806 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          // Original author: kennyluck
          //
          // Kenny's Notes:
          /* places to generate SPARQL update: clearInputAndSave() pasteFromClipboard()->insertTermTo();
                                            undetermined statement generated formUndetStat()
          Severity: Major
          Found in src/outline/userInput.js - About 4 days to fix

            Function render has a Cognitive Complexity of 179 (exceeds 5 allowed). Consider refactoring.
            Open

              render: function (s, context) {
                var dom = context.dom
                var common = function (x, y) {
                  // Find common members of two lists
                  var both = []
            Severity: Minor
            Found in src/socialPane.js - About 3 days 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

            File microblogPane.js has 1212 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*
             Microblog pane
             Charles McKenzie <charles2@mit.edu>
            */
            /* global alert */
            Severity: Major
            Found in src/microblogPane/microblogPane.js - About 3 days to fix

              Function render has 608 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                render: function (subject, context) {
                  const dom = context.dom
                  var kb = context.session.store
                  var ns = UI.ns
                  var invitation = subject
              Severity: Major
              Found in src/schedule/schedulePane.js - About 3 days to fix

                Function render has a Cognitive Complexity of 149 (exceeds 5 allowed). Consider refactoring.
                Open

                  render: function (subject, context) {
                    const dom = context.dom
                    var kb = context.session.store
                    var ns = UI.ns
                
                
                Severity: Minor
                Found in src/transaction/period.js - About 3 days 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 467 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  render: function (subject, context) {
                    const dom = context.dom
                    var kb = context.session.store
                    var fetcher = kb.fetcher
                    var Q = $rdf.Namespace('http://www.w3.org/2000/10/swap/pim/qif#')
                Severity: Major
                Found in src/transaction/pane.js - About 2 days to fix

                  Function render has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
                  Open

                    render: function (subject, context) {
                      const dom = context.dom
                      var kb = context.session.store
                      var WF = $rdf.Namespace('http://www.w3.org/2005/01/wf/flow#')
                      var QU = $rdf.Namespace('http://www.w3.org/2000/10/swap/pim/qif#')
                  Severity: Minor
                  Found in src/attach/attachPane.js - About 2 days 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

                  File schedulePane.js has 861 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /*   Scheduler Pane
                   **
                   **
                   */
                  /* global alert */
                  Severity: Major
                  Found in src/schedule/schedulePane.js - About 2 days to fix

                    Function render has 407 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      render: function (s, context) {
                        var dom = context.dom
                        var common = function (x, y) {
                          // Find common members of two lists
                          var both = []
                    Severity: Major
                    Found in src/socialPane.js - About 2 days to fix

                      Function render has 366 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        render: function (subject, context, paneOptions: any) {
                          const dom = context.dom
                          const store = context.session.store
                          // Utility functions
                          var complainIfBad = function (ok: boolean, message: string) {
                      Severity: Major
                      Found in src/pad/padPane.ts - About 1 day to fix

                        Function render has 363 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          render: function (subject, context) {
                            const dom = context.dom
                            var kb = context.session.store
                            var WF = $rdf.Namespace('http://www.w3.org/2005/01/wf/flow#')
                            var QU = $rdf.Namespace('http://www.w3.org/2000/10/swap/pim/qif#')
                        Severity: Major
                        Found in src/attach/attachPane.js - About 1 day to fix

                          Function showMenu has 361 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              showMenu: function showMenu (
                                e,
                                menuType,
                                inputQuery,
                                extraInformation,
                          Severity: Major
                          Found in src/outline/userInput.js - About 1 day to fix

                            Function render has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring.
                            Open

                              render: function (subject, context) {
                                const dom = context.dom
                                var kb = context.session.store
                                var fetcher = kb.fetcher
                                var Q = $rdf.Namespace('http://www.w3.org/2000/10/swap/pim/qif#')
                            Severity: Minor
                            Found in src/transaction/pane.js - About 1 day 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