michielbdejong/solid-panes

View on GitHub

Showing 327 of 327 total issues

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

  render: (subject, context) => {
    const dom = context.dom
    const store = context.session.store

    function complainIfBad (ok: Boolean, mess: any) {
Severity: Major
Found in src/dashboard/basicPreferences.ts - About 2 hrs to fix

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

      render: function (subject, context) {
        const store = context.session.store
    
        async function doRender (
          container: HTMLElement,
    Severity: Major
    Found in src/profile/profile.view.ts - About 2 hrs to fix

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

        render: function (subject, context) {
          var myDocument = context.dom
      
          function alternativeRendering () {
            var sz = UI.rdf.Serializer(context.session.store)
      Severity: Major
      Found in src/dataContentPane.js - About 2 hrs to fix

        Function appendAccessIcon has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          this.appendAccessIcon = function (node, uri) {
            if (!uri) return ''
            var docuri = UI.rdf.uri.docpart(uri)
            if (docuri.slice(0, 5) !== 'http:') return ''
            var state = sf.getState(docuri)
        Severity: Major
        Found in src/outline/manager.js - About 2 hrs to fix

          Function lsFollowUser has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                function lsFollowUser () {
                  var myUser = kb.sym(mb.getMyURI())
                  // var Ifollow = that.Ifollow
                  var username = that.creator.name
                  var mbconfirmFollow = function (uri, success, _msg) {
          Severity: Major
          Found in src/microblogPane/microblogPane.js - About 2 hrs to fix

            Function renderTrip has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var renderTrip = function renderTrip (subject, thisDiv) {
                  var query = new $rdf.Query(UI.utils.label(subject))
                  var vars = ['date', 'transaction', 'comment', 'type', 'in_USD']
                  var v = {}
                  vars.map(function (x) {
            Severity: Minor
            Found in src/trip/tripPane.js - About 2 hrs to fix

              Function mintNew has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                mintNew: function (context, newPaneOptions) {
                  var kb = context.session.store
                  var newInstance = newPaneOptions.newInstance
                  if (!newInstance) {
                    let uri = newPaneOptions.newBase
              Severity: Minor
              Found in src/dokieli/dokieliPane.js - About 2 hrs to fix

                Function outlinePredicateTD has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  this.outlinePredicateTD = function outlinePredicateTD (
                    predicate,
                    newTr,
                    inverse,
                    internal
                Severity: Minor
                Found in src/outline/manager.js - About 2 hrs to fix

                  Function transactionTable has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      var transactionTable = function (dom, list, filter) {
                        var table = dom.createElement('table')
                        table.setAttribute(
                          'style',
                          'padding-left: 0.5em; padding-right: 0.5em; font-size: 9pt; width: 85%;'
                  Severity: Minor
                  Found in src/transaction/pane.js - About 2 hrs to fix

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

                        function render () {
                          subject = kb.canon(subject)
                          if (!p || !p.parentNode || !p.parentNode.parentNode) return false
                    
                          var newTable
                    Severity: Minor
                    Found in src/outline/manager.js - About 1 hr to fix

                      Function addNewPredicateObject has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          addNewPredicateObject: function addNewPredicateObject (e) {
                            if (UI.utils.getTarget(e).className !== 'bottom-border-active') return
                            var This = outline.UserInput
                            var target = UI.utils.getTarget(e)
                      
                      
                      Severity: Minor
                      Found in src/outline/userInput.js - About 1 hr to fix

                        Function transactionTable has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              var transactionTable = function (dom, list) {
                                var table = dom.createElement('table')
                                table.setAttribute(
                                  'style',
                                  'margin-left: 100; font-size: 9pt; width: 85%;'
                        Severity: Minor
                        Found in src/transaction/period.js - About 1 hr to fix

                          Function QuerySource has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function QuerySource () {
                            /**
                             * stores all of the queries currently held by this source,
                             * indexed by ID number.
                             */
                          Severity: Minor
                          Found in src/outline/queryByExample.js - About 1 hr to fix

                            Function literalModification has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                literalModification: function literalModification (selectedTd) {
                                  UI.log.debug(
                                    'entering literal Modification with ' +
                                      selectedTd +
                                      selectedTd.textContent
                            Severity: Minor
                            Found in src/outline/userInput.js - About 1 hr to fix

                              Function setSelected has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function setSelected (node, newValue) {
                                  // UI.log.info('selection has ' +selection.map(function(item){return item.textContent;}).join(', '));
                                  // UI.log.debug('@outline setSelected, intended to '+(newValue?'select ':'deselect ')+node+node.textContent);
                                  // if (newValue === selected(node)) return; //we might not need this anymore...
                                  if (node.nodeName !== 'TD') {
                              Severity: Minor
                              Found in src/outline/manager.js - About 1 hr to fix

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

                                    var expandAfterRowOrCollapse = function (
                                      dom,
                                      row,
                                      subject,
                                      paneName,
                                Severity: Major
                                Found in src/transaction/pane.js and 1 other location - About 1 hr to fix
                                src/transaction/period.js on lines 162..175

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

                                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

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

                                      var expandAfterRowOrCollapse = function (
                                        dom,
                                        row,
                                        subject,
                                        paneName,
                                Severity: Major
                                Found in src/transaction/period.js and 1 other location - About 1 hr to fix
                                src/transaction/pane.js on lines 163..176

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

                                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 displayFormsForRelation has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        var displayFormsForRelation = function displayFormsForRelation (
                                          pred,
                                          allowCreation
                                        ) {
                                          var sts = kb.statementsMatching(subject, pred)
                                Severity: Minor
                                Found in src/ui/pane.js - About 1 hr to fix

                                  Function expand has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function expand (uri) {
                                        if (arguments[3]) return true // already fetched indicator
                                        var cursubj = kb.canon(subject) // canonical identifier may have changed
                                        UI.log.info(
                                          '@@ expand: relevant subject=' +
                                  Severity: Minor
                                  Found in src/outline/manager.js - About 1 hr to fix

                                    Function pasteFromClipboard has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        pasteFromClipboard: function pasteFromClipboard (address, selectedTd) {
                                          function termFrom (fromCode) {
                                            var term = outline.clipboard[fromCode].shift()
                                            if (term === null) {
                                              UI.log.warn('no more element in clipboard!')
                                    Severity: Minor
                                    Found in src/outline/userInput.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language