michielbdejong/solid-ui

View on GitHub

Showing 270 of 337 total issues

Function renderTableViewPane has a Cognitive Complexity of 376 (exceeds 5 allowed). Consider refactoring.
Open

module.exports = function renderTableViewPane (doc, options) {
  var sourceDocument = options.sourceDocument
  var tableClass = options.tableClass
  var givenQuery = options.query

Severity: Minor
Found in src/table.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 renderTableViewPane has 1064 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function renderTableViewPane (doc, options) {
  var sourceDocument = options.sourceDocument
  var tableClass = options.tableClass
  var givenQuery = options.query

Severity: Major
Found in src/table.js - About 5 days to fix

    File forms.js has 1645 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*       F O R M S
     *
     *      A Vanilla Dom implementation of the form language
     */
    
    
    Severity: Major
    Found in src/widgets/forms.js - About 4 days to fix

      Function notepad has a Cognitive Complexity of 184 (exceeds 5 allowed). Consider refactoring.
      Open

      UI.pad.notepad = function (dom, padDoc, subject, me, options) {
        options = options || {}
        var exists = options.exists
        var table = dom.createElement('table')
        var kb = UI.store
      Severity: Minor
      Found in src/pad.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 infiniteMessageArea has a Cognitive Complexity of 181 (exceeds 5 allowed). Consider refactoring.
      Open

      export function infiniteMessageArea (dom, kb, chatChannel, options) {
        kb = kb || UI.store
        const ns = UI.ns
        const WF = $rdf.Namespace('http://www.w3.org/2005/01/wf/flow#')
        const DCT = $rdf.Namespace('http://purl.org/dc/terms/')
      Severity: Minor
      Found in src/chat/infinite.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 infiniteMessageArea has 584 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function infiniteMessageArea (dom, kb, chatChannel, options) {
        kb = kb || UI.store
        const ns = UI.ns
        const WF = $rdf.Namespace('http://www.w3.org/2005/01/wf/flow#')
        const DCT = $rdf.Namespace('http://purl.org/dc/terms/')
      Severity: Major
      Found in src/chat/infinite.js - About 2 days to fix

        Function notepad has 580 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        UI.pad.notepad = function (dom, padDoc, subject, me, options) {
          options = options || {}
          var exists = options.exists
          var table = dom.createElement('table')
          var kb = UI.store
        Severity: Major
        Found in src/pad.js - About 2 days to fix

          File table.js has 1075 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          // Table Widget: Format an array of RDF statements as an HTML table.
          //
          // This can operate in one of three modes: when the class of object is given
          // or when the source document from whuch data is taken is given,
          // or if a prepared query object is given.
          Severity: Major
          Found in src/table.js - About 2 days to fix

            File authn.ts has 1031 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /**
             * signin.js
             *
             * Signing in, signing up, profile and preferences reloading
             * Type index management
            Severity: Major
            Found in src/authn/authn.ts - About 2 days to fix

              File buttons.js has 853 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /* UI Widgets such as buttons
               */
              /* global alert */
              
              const $rdf = require('rdflib')
              Severity: Major
              Found in src/widgets/buttons.js - About 2 days to fix

                Function matrixForQuery has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring.
                Open

                module.exports.matrixForQuery = function (
                  dom,
                  query,
                  vx,
                  vy,
                Severity: Minor
                Found in src/matrix.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

                File pad.js has 742 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /** **************
                 *   Notepad Widget
                 */
                
                /** @module UI.pad
                Severity: Major
                Found in src/pad.js - About 1 day to fix

                  Function exports has 307 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  module.exports = function (dom, kb, subject, messageStore, options) {
                    kb = kb || UI.store
                    messageStore = messageStore.doc() // No hash
                    var ns = UI.ns
                    var WF = $rdf.Namespace('http://www.w3.org/2005/01/wf/flow#')
                  Severity: Major
                  Found in src/chat/thread.js - About 1 day to fix

                    Function exports has 307 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    module.exports = function (dom, kb, subject, messageStore, options) {
                      kb = kb || UI.store
                      messageStore = messageStore.doc() // No hash
                      var ns = UI.ns
                      var WF = $rdf.Namespace('http://www.w3.org/2005/01/wf/flow#')
                    Severity: Major
                    Found in src/messageArea.js - About 1 day to fix

                      File infinite.js has 645 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      //  Common code for a discussion are a of messages about something
                      //   This version runs over a series of files for different time periods
                      //
                      //  Parameters for the whole chat like its title are stred on
                      //  index.ttl#this and the chats messages are stored in YYYY/MM/DD/chat.ttl
                      Severity: Major
                      Found in src/chat/infinite.js - About 1 day to fix

                        Function tabWidget has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
                        Open

                        UI.tabs.tabWidget = function (options) {
                          var kb = UI.store
                          var subject = options.subject
                          var dom = options.dom
                          var orientation = parseInt(options.orientation || '0')
                        Severity: Minor
                        Found in src/tabs.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

                        Function makeSelectForOptions has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
                        Open

                        forms.makeSelectForOptions = function (
                          dom,
                          kb,
                          subject,
                          predicate,
                        Severity: Minor
                        Found in src/widgets/forms.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

                        Function tabWidget has 234 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        UI.tabs.tabWidget = function (options) {
                          var kb = UI.store
                          var subject = options.subject
                          var dom = options.dom
                          var orientation = parseInt(options.orientation || '0')
                        Severity: Major
                        Found in src/tabs.js - About 1 day to fix

                          File utils.js has 512 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          //                  Solid-UI general Utilities
                          //                  ==========================
                          //
                          // This must load AFTER the rdflib.js and log-ext.js (or log.js).
                          //
                          Severity: Major
                          Found in src/utils.js - About 1 day to fix

                            File acl.ts has 511 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            // Access control logic
                            
                            import * as $rdf from 'rdflib'
                            import ns from '../ns'
                            import kb from '../store.js'
                            Severity: Major
                            Found in src/acl/acl.ts - About 1 day to fix
                              Severity
                              Category
                              Status
                              Source
                              Language