michielbdejong/solid-panes

View on GitHub

Showing 243 of 327 total issues

Function showBootstrap has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var showBootstrap = function showBootstrap () {
      var div = clearElement(naviMain)
      div.appendChild(
        UI.authn.newAppInstance(
          dom,
Severity: Minor
Found in src/schedule/schedulePane.js - About 1 hr to fix

    Function label has 28 lines of code (exceeds 25 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 1 hr to fix

      Function outlineCollapse has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function outlineCollapse (p, subject) {
          var row = UI.utils.ancestor(p, 'TR')
          row = UI.utils.ancestor(row.parentNode, 'TR') // two levels up
          if (row) var statement = row.AJAR_statement
          var level // find level (the enclosing TD)
      Severity: Minor
      Found in src/outline/manager.js - About 1 hr to fix

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

          render: function (subject, context) {
            var dom = context.dom
            var styleSheet =
              'https://leemark.github.io/better-simple-slideshow/css/simple-slideshow-styles.css'
            UI.widgets.addStyleSheet(dom, styleSheet)
        Severity: Minor
        Found in src/slideshow/slideshowPane.js - About 1 hr to fix

          Function getMembersAndSort has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              var getMembersAndSort = function (subject) {
                var sortBy = getSortKey(subject)
                var u, x, key
                var uriHash = kb.findMemberURIs(subject)
                var pairs = []
          Severity: Minor
          Found in src/attach/attachPane.js - About 1 hr to fix

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

              render: function (subject, context) {
                var dom = context.dom
            
                var filter = function (pred, inverse) {
                  if (
            Severity: Minor
            Found in src/defaultPane.js - About 1 hr 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 10 (exceeds 5 allowed). Consider refactoring.
            Open

              render: function (subject, context) {
                const store = context.session.store
            
                async function doRender (
                  container: HTMLElement,
            Severity: Minor
            Found in src/profile/profile.view.ts - About 1 hr 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 addNewObject has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                addNewObject: function addNewObject (e) {
                  var predicateTd = UI.utils.getTarget(e).parentNode.parentNode
                  // var predicateTerm = UI.utils.getAbout(kb, predicateTd)
                  var isInverse = predicateTd.parentNode.AJAR_inverse
                  // var titleTerm=UI.utils.getAbout(kb,UI.utils.ancestor(predicateTd.parentNode,'TD'));
            Severity: Minor
            Found in src/outline/userInput.js - About 1 hr to fix

              Function showBootstrap has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var showBootstrap = function showBootstrap (
                    thisInstance: any,
                    container: HTMLElement,
                    noun: string
                  ) {
              Severity: Minor
              Found in src/pad/padPane.ts - About 1 hr to fix

                Function showFiltered has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    var showFiltered = function (mode) {
                      var filtered = mode === 0 ? objects : getFiltered()
                      // eslint-enable
                      UI.widgets.selectorPanelRefresh(
                        objectList,
                Severity: Minor
                Found in src/attach/attachPane.js - About 1 hr to fix

                  Function showContent has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      var showContent = async function () {
                        var homePaneContext = { div: div, dom: dom, statusArea: div, me: me }
                        /*
                              div.appendChild(dom.createElement('h4')).textContent = 'Login status'
                              var loginStatusDiv = div.appendChild(context.dom.createElement('div'))
                  Severity: Minor
                  Found in src/home/homePane.ts - About 1 hr to fix

                    Function doRender has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        async function doRender () {
                          const renderContext = await authn.logInLoadPreferences({
                            dom,
                            div: container
                          })
                    Severity: Minor
                    Found in src/dashboard/basicPreferences.ts - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                          if (
                            obj.termType === 'NamedNode' ||
                            obj.termType === 'BlankNode' ||
                            (obj.termType === 'Literal' &&
                              obj.value.slice &&
                      Severity: Major
                      Found in src/outline/manager.js - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                            if (
                              (subject.termType === 'NamedNode' &&
                                kb.updater.editable(UI.rdf.Util.uri.docpart(subject.uri), kb)) ||
                              (subject.termType === 'BlankNode' &&
                                kb.anyStatementMatching(subject) &&
                        Severity: Major
                        Found in src/defaultPane.js - About 1 hr to fix

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

                          function createApplicationEntry (
                            subject: NamedNode,
                            origin: NamedNode | null,
                            appModes: NamedNode[],
                            updateTable: () => void
                          Severity: Minor
                          Found in src/trustedApplications/trustedApplications.dom.ts - 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

                          Avoid deeply nested control flow statements.
                          Open

                                            if (enterEvent.keyCode === 37) {
                                              setHighlightItem(menu.lastHighlight.previousSibling)
                                            } else {
                                              setHighlightItem(menu.lastHighlight.nextSibling)
                                            }
                          Severity: Major
                          Found in src/outline/userInput.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if (d.paneButton) {
                                                      d.paneButton.setAttribute('class', 'paneHidden')
                                                      d.paneButton.style = paneHiddenStyle
                                                    }
                            Severity: Major
                            Found in src/outline/manager.js - About 45 mins to fix

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

                                render: function (subject, context) {
                                  var myDocument = context.dom
                              
                                  function alternativeRendering () {
                                    var sz = UI.rdf.Serializer(context.session.store)
                              Severity: Minor
                              Found in src/dataContentPane.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

                              Avoid deeply nested control flow statements.
                              Open

                                                switch (menu.lastHighlight.value) {
                                                  case 'New...':
                                                    qp('subcase New')
                                                    outline.UserInput.createNew()
                                                    break
                              Severity: Major
                              Found in src/outline/userInput.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                  if (mode === 'JournalTAC') {
                                                    outline.UserInput.clearMenu()
                                                    qp('no lastH')
                                                    return 'no lastH'
                                                  }
                                Severity: Major
                                Found in src/outline/userInput.js - About 45 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language