acsone/alfodoo

View on GitHub

Showing 538 of 538 total issues

Function parseRawLines has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function parseRawLines(rawText, extendedSyntax, parsedRawLinesCallback) {
        var entries = rawText.replace(reBlank, '').split(/[\r\n]+/);
        var currentLang = '*';
        var genericLang = lang.split('-', 1)[0];
        var skipLang = false;
Severity: Minor
Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 1 hr to fix

    Function unbindEvents has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      unbindEvents: function unbindEvents() {
        var eventBus = this.eventBus,
            _boundEvents = this._boundEvents;
    
        eventBus.off('resize', webViewerResize);
    Severity: Minor
    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

      Function bindEvents has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        bindEvents: function bindEvents() {
          var eventBus = this.eventBus,
              _boundEvents = this._boundEvents;
      
          _boundEvents.beforePrint = this.beforePrint.bind(this);
      Severity: Minor
      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

        Function paintOnSvg has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            value: function paintOnSvg(wrapper) {
              var _this2 = this;
        
              var cancelled = false;
              var ensureNotCancelled = function ensureNotCancelled() {
        Severity: Minor
        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

          Function parseRawLines has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                function parseRawLines(rawText, extendedSyntax, parsedRawLinesCallback) {
                  var entries = rawText.replace(reBlank, '').split(/[\r\n]+/);
                  var currentLang = '*';
                  var genericLang = lang.split('-', 1)[0];
                  var skipLang = false;
          Severity: Minor
          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

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

                     $el_actions.find('.content-action-get-properties').on('click', function(e) {
                         self._prevent_on_hashchange(e);
                         var row = self._get_event_row(e);
                         self.on_click_get_properties(row);
                     });
            Severity: Major
            Found in cmis_web/static/src/js/form_widgets.js and 6 other locations - About 1 hr to fix
            cmis_web/static/src/js/form_widgets.js on lines 1207..1211
            cmis_web/static/src/js/form_widgets.js on lines 1212..1216
            cmis_web/static/src/js/form_widgets.js on lines 1217..1221
            cmis_web/static/src/js/form_widgets.js on lines 1222..1226
            cmis_web/static/src/js/form_widgets.js on lines 1227..1231
            cmis_web/static/src/js/form_widgets.js on lines 1232..1236

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

            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 7 locations. Consider refactoring.
            Open

                     $el_actions.find('.content-action-checkin').on('click', function(e) {
                         self._prevent_on_hashchange(e);
                         var row = self._get_event_row(e);
                         self.on_click_checkin(row);
                     });
            Severity: Major
            Found in cmis_web/static/src/js/form_widgets.js and 6 other locations - About 1 hr to fix
            cmis_web/static/src/js/form_widgets.js on lines 1202..1206
            cmis_web/static/src/js/form_widgets.js on lines 1207..1211
            cmis_web/static/src/js/form_widgets.js on lines 1212..1216
            cmis_web/static/src/js/form_widgets.js on lines 1217..1221
            cmis_web/static/src/js/form_widgets.js on lines 1227..1231
            cmis_web/static/src/js/form_widgets.js on lines 1232..1236

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

            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 7 locations. Consider refactoring.
            Open

                     $el_actions.find('.content-action-set-content-stream').on('click', function(e) {
                         self._prevent_on_hashchange(e);
                         var row = self._get_event_row(e);
                         self.on_click_set_content_stream(row);
                     });
            Severity: Major
            Found in cmis_web/static/src/js/form_widgets.js and 6 other locations - About 1 hr to fix
            cmis_web/static/src/js/form_widgets.js on lines 1202..1206
            cmis_web/static/src/js/form_widgets.js on lines 1207..1211
            cmis_web/static/src/js/form_widgets.js on lines 1217..1221
            cmis_web/static/src/js/form_widgets.js on lines 1222..1226
            cmis_web/static/src/js/form_widgets.js on lines 1227..1231
            cmis_web/static/src/js/form_widgets.js on lines 1232..1236

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

            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 7 locations. Consider refactoring.
            Open

                     $el_actions.find('.content-action-checkout').on('click', function(e) {
                         self._prevent_on_hashchange(e);
                         var row = self._get_event_row(e);
                         self.on_click_checkout(row);
                     });
            Severity: Major
            Found in cmis_web/static/src/js/form_widgets.js and 6 other locations - About 1 hr to fix
            cmis_web/static/src/js/form_widgets.js on lines 1202..1206
            cmis_web/static/src/js/form_widgets.js on lines 1207..1211
            cmis_web/static/src/js/form_widgets.js on lines 1212..1216
            cmis_web/static/src/js/form_widgets.js on lines 1217..1221
            cmis_web/static/src/js/form_widgets.js on lines 1222..1226
            cmis_web/static/src/js/form_widgets.js on lines 1232..1236

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

            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 7 locations. Consider refactoring.
            Open

                     $el_actions.find('.content-action-cancel-checkout').on('click', function(e) {
                         self._prevent_on_hashchange(e);
                         var row = self._get_event_row(e);
                         self.on_click_cancel_checkout(row);
                     });
            Severity: Major
            Found in cmis_web/static/src/js/form_widgets.js and 6 other locations - About 1 hr to fix
            cmis_web/static/src/js/form_widgets.js on lines 1202..1206
            cmis_web/static/src/js/form_widgets.js on lines 1207..1211
            cmis_web/static/src/js/form_widgets.js on lines 1212..1216
            cmis_web/static/src/js/form_widgets.js on lines 1217..1221
            cmis_web/static/src/js/form_widgets.js on lines 1222..1226
            cmis_web/static/src/js/form_widgets.js on lines 1227..1231

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

            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 7 locations. Consider refactoring.
            Open

                     $el_actions.find('.content-action-rename').on('click', function(e) {
                         self._prevent_on_hashchange(e);
                         var row = self._get_event_row(e);
                         self.on_click_rename(row);
                     });
            Severity: Major
            Found in cmis_web/static/src/js/form_widgets.js and 6 other locations - About 1 hr to fix
            cmis_web/static/src/js/form_widgets.js on lines 1202..1206
            cmis_web/static/src/js/form_widgets.js on lines 1212..1216
            cmis_web/static/src/js/form_widgets.js on lines 1217..1221
            cmis_web/static/src/js/form_widgets.js on lines 1222..1226
            cmis_web/static/src/js/form_widgets.js on lines 1227..1231
            cmis_web/static/src/js/form_widgets.js on lines 1232..1236

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

            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 7 locations. Consider refactoring.
            Open

                     $el_actions.find('.content-action-delete-object').on('click', function(e) {
                         self._prevent_on_hashchange(e);
                         var row = self._get_event_row(e);
                         self.on_click_delete_object(row);
                     });
            Severity: Major
            Found in cmis_web/static/src/js/form_widgets.js and 6 other locations - About 1 hr to fix
            cmis_web/static/src/js/form_widgets.js on lines 1202..1206
            cmis_web/static/src/js/form_widgets.js on lines 1207..1211
            cmis_web/static/src/js/form_widgets.js on lines 1212..1216
            cmis_web/static/src/js/form_widgets.js on lines 1222..1226
            cmis_web/static/src/js/form_widgets.js on lines 1227..1231
            cmis_web/static/src/js/form_widgets.js on lines 1232..1236

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

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

                value: function setImage(pageView) {
                  if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) {
                    return;
                  }
                  var img = pageView.canvas;
            Severity: Minor
            Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 1 hr to fix

              Function _convertCanvasToImage has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  value: function _convertCanvasToImage() {
                    var _this = this;
              
                    if (!this.canvas) {
                      return;
              Severity: Minor
              Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 1 hr to fix

                Function executeNamedAction has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    value: function executeNamedAction(action) {
                      switch (action) {
                        case 'GoBack':
                          if (this.pdfHistory) {
                            this.pdfHistory.back();
                Severity: Minor
                Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 1 hr to fix

                  Function setImage has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      value: function setImage(pageView) {
                        if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) {
                          return;
                        }
                        var img = pageView.canvas;
                  Severity: Minor
                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                    Function _convertCanvasToImage has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        value: function _convertCanvasToImage() {
                          var _this = this;
                    
                          if (!this.canvas) {
                            return;
                    Severity: Minor
                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

                      Function executeNamedAction has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          value: function executeNamedAction(action) {
                            switch (action) {
                              case 'GoBack':
                                if (this.pdfHistory) {
                                  this.pdfHistory.back();
                      Severity: Minor
                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 hr to fix

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

                        var NullL10n = {
                          get: function get(property, args, fallback) {
                            return Promise.resolve(formatL10nValue(fallback, args));
                          },
                          translate: function translate(element) {
                        Severity: Major
                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js and 1 other location - About 1 hr to fix
                        cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js on lines 123..130

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

                        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 NullL10n = {
                          get: function get(property, args, fallback) {
                            return Promise.resolve(formatL10nValue(fallback, args));
                          },
                          translate: function translate(element) {
                        Severity: Major
                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 hr to fix
                        cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 123..130

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

                        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

                        Severity
                        Category
                        Status
                        Source
                        Language