michielbdejong/solid-ui

View on GitHub

Showing 337 of 337 total issues

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

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

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

      dom,
      kb,
      subject,
      predicate,
      theClass,
    Severity: Major
    Found in src/widgets/forms.js - About 1 hr to fix

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

        dom,
        kb,
        subject,
        predicate,
        possible,
      Severity: Major
      Found in src/widgets/forms.js - About 1 hr to fix

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

          dom,
          kb,
          subject,
          predicate,
          theClass,
        Severity: Major
        Found in src/widgets/forms.js - About 1 hr to fix

          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

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

            forms.fieldParams[ns.ui('Comment').uri] = {
              element: 'p',
              style: `padding: 0.1em 1.5em; color: ${UI.style.formHeadingColor}; white-space: pre-wrap;`
            }
            Severity: Minor
            Found in src/widgets/forms.js and 1 other location - About 55 mins to fix
            src/widgets/forms.js on lines 1084..1087

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

            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

                    case 38: // Up
                      if (part.parentNode.previousSibling) {
                        part.parentNode.previousSibling.firstChild.focus()
                        event.preventDefault()
                      }
            Severity: Minor
            Found in src/pad.js and 1 other location - About 55 mins to fix
            src/pad.js on lines 459..464

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

            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

            forms.fieldParams[ns.ui('Heading').uri] = {
              element: 'h3',
              style: `font-size: 110%; color: ${UI.style.formHeadingColor};`
            }
            Severity: Minor
            Found in src/widgets/forms.js and 1 other location - About 55 mins to fix
            src/widgets/forms.js on lines 1080..1083

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

            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

                    case 40: // Down
                      if (part.parentNode.nextSibling) {
                        part.parentNode.nextSibling.firstChild.focus()
                        event.preventDefault()
                      }
            Severity: Minor
            Found in src/pad.js and 1 other location - About 55 mins to fix
            src/pad.js on lines 452..457

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

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

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

                  forms.field[ns.ui('BooleanField').uri] = function (
                    dom,
                    container,
                    already,
                    subject,
                  Severity: Minor
                  Found in src/widgets/forms.js and 1 other location - About 50 mins to fix
                  src/widgets/forms.js on lines 906..925

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

                  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

                  forms.field[ns.ui('TristateField').uri] = function (
                    dom,
                    container,
                    already,
                    subject,
                  Severity: Minor
                  Found in src/widgets/forms.js and 1 other location - About 50 mins to fix
                  src/widgets/forms.js on lines 885..904

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

                  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

                        try {
                          await kb.fetcher.load(ixs)
                        } catch (err) {
                          widgets.complain(context, `ensureOneTypeIndex: loading indexes ${err}`)
                        }
                  Severity: Minor
                  Found in src/authn/authn.ts and 1 other location - About 50 mins to fix
                  src/authn/authn.ts on lines 351..355

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

                  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

                    try {
                      await kb.fetcher.load(ixs)
                    } catch (err) {
                      widgets.complain(context, `loadPubicIndex: loading public type index ${err}`)
                    }
                  Severity: Minor
                  Found in src/authn/authn.ts and 1 other location - About 50 mins to fix
                  src/authn/authn.ts on lines 425..429

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

                  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 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
                        Severity
                        Category
                        Status
                        Source
                        Language