michielbdejong/solid-ui

View on GitHub

Showing 270 of 337 total issues

Function loadController has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

  doc: NamedNode,
  kb: IndexedFormula,
  subject: NamedNode,
  noun: string,
  context: DataBrowserContext,
Severity: Major
Found in src/acl/acl-control.ts - About 1 hr to fix

    Function toggleBookmark has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    export async function toggleBookmark (userContext, target, bookmarkButton) {
      await kb.fetcher.load(userContext.bookmarkDocument)
      const bookmarks = kb.each(
        null,
        BOOK('recalls'),
    Severity: Minor
    Found in src/chat/bookmarks.js - About 55 mins 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 matrixForQuery has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      dom,
      query,
      vx,
      vy,
      vvalue,
    Severity: Major
    Found in src/matrix.js - About 50 mins to fix

      Function basicField has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        dom,
        container,
        already,
        subject,
        form,
      Severity: Major
      Found in src/widgets/forms.js - About 50 mins to fix

        Function appendForm has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          dom,
          container,
          already,
          subject,
          form,
        Severity: Major
        Found in src/widgets/forms.js - About 50 mins to fix

          Function sentimentButton has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              context,
              target,
              icon,
              actionClass,
              doc,
          Severity: Minor
          Found in src/chat/messageTools.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                        if (obj.toString() !== orig.toString()) {
                          different = true
                        }
            Severity: Major
            Found in src/table.js - About 45 mins to fix

              Function askName has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              buttons.askName = function (dom, kb, container, predicate, klass, noun) {
              Severity: Minor
              Found in src/widgets/buttons.js - About 45 mins to fix

                Function manageParticipation has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  dom,
                  container,
                  padDoc,
                  subject,
                  me,
                Severity: Minor
                Found in src/pad.js - About 45 mins to fix

                  Function predicateLabelForXML has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function predicateLabelForXML (p, inverse) {
                    var lab
                    if (inverse) {
                      // If we know an inverse predicate, use its label
                      var ip = UI.store.any(p, UI.ns.owl('inverseOf'))
                  Severity: Minor
                  Found in src/utils.js - About 45 mins 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 renderPartipants has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  UI.pad.renderPartipants = function (dom, table, padDoc, subject, me, options) {
                  Severity: Minor
                  Found in src/pad.js - About 45 mins to fix

                    Function findAppInstances has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export async function findAppInstances (
                      context: AuthenticationContext,
                      klass: $rdf.NamedNode,
                      isPublic: boolean
                    ): Promise<AuthenticationContext> {
                    Severity: Minor
                    Found in src/authn/authn.ts - About 45 mins 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 makeACLGraphbyCombo has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      kb: $rdf.IndexedFormula,
                      x: $rdf.NamedNode,
                      byCombo: ComboList,
                      aclDoc: $rdf.NamedNode,
                      main?: boolean,
                    Severity: Minor
                    Found in src/acl/acl.ts - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                          for (p in possibleProperties.dp) possible.push(kb.fromNT(p))
                      Severity: Major
                      Found in src/widgets/forms.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                    if (!b[pred][agent] || !b[pred][agent][mode]) {
                                      return false
                                    }
                        Severity: Major
                        Found in src/acl/acl.ts - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                        if (!b[pred][ag]) b[pred][ag] = []
                          Severity: Major
                          Found in src/acl/acl.ts - About 45 mins to fix

                            Function makeSelectForNestedCategory has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                              dom,
                              kb,
                              subject,
                              category,
                              store,
                            Severity: Minor
                            Found in src/widgets/forms.js - About 45 mins to fix

                              Function attachmentList has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                              buttons.attachmentList = function (dom, subject, div, options) {
                                options = options || {}
                                var doc = options.doc || subject.doc()
                                if (options.modify === undefined) options.modify = true
                                var modify = options.modify
                              Severity: Minor
                              Found in src/widgets/buttons.js - About 45 mins 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 makeDescription has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                dom,
                                kb,
                                subject,
                                predicate,
                                store,
                              Severity: Minor
                              Found in src/widgets/forms.js - About 45 mins to fix

                                Function makeSelectForCategory has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                  dom,
                                  kb,
                                  subject,
                                  category,
                                  store,
                                Severity: Minor
                                Found in src/widgets/forms.js - About 45 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language