acsone/alfodoo

View on GitHub

Showing 538 of 538 total issues

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

function webViewerSidebarViewChanged(evt) {
  PDFViewerApplication.pdfRenderingQueue.isThumbnailViewEnabled = PDFViewerApplication.pdfSidebar.isThumbnailViewVisible;
  var store = PDFViewerApplication.store;
  if (store && PDFViewerApplication.isInitialViewSet) {
    store.set('sidebarView', evt.view).catch(function () {});
Severity: Major
Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 hrs to fix
cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2091..2097

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

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

  open: function open(file, args) {
    var _this3 = this;

    if (arguments.length > 2 || typeof args === 'number') {
      return Promise.reject(new Error('Call of open() with obsolete signature.'));
Severity: Major
Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 2 hrs to fix

    Function navigateTo has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        value: function navigateTo(dest) {
          var _this = this;
    
          var goToDestination = function goToDestination(_ref2) {
            var namedDest = _ref2.namedDest,
    Severity: Major
    Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 2 hrs to fix

      Function open has 63 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        open: function open(file, args) {
          var _this3 = this;
      
          if (arguments.length > 2 || typeof args === 'number') {
            return Promise.reject(new Error('Call of open() with obsolete signature.'));
      Severity: Major
      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

        Function navigateTo has 63 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            value: function navigateTo(dest) {
              var _this = this;
        
              var goToDestination = function goToDestination(_ref2) {
                var namedDest = _ref2.namedDest,
        Severity: Major
        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

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

            function removeSelection() {
              var divs = document.querySelectorAll('div[' + fontAttribute + ']');
              for (var i = 0, ii = divs.length; i < ii; ++i) {
                var div = divs[i];
                div.className = '';
          Severity: Major
          Found in cmis_web/static/lib/pdfjs-1.9.426/web/debugger.js and 1 other location - About 2 hrs to fix
          cmis_web/static/lib/pdfjs-1.9.426/web/debugger.js on lines 29..35

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

          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

            function resetSelection() {
              var divs = document.querySelectorAll('div[' + fontAttribute + ']');
              for (var i = 0, ii = divs.length; i < ii; ++i) {
                var div = divs[i];
                div.className = 'debuggerHideText';
          Severity: Major
          Found in cmis_web/static/lib/pdfjs-1.9.426/web/debugger.js and 1 other location - About 2 hrs to fix
          cmis_web/static/lib/pdfjs-1.9.426/web/debugger.js on lines 22..28

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

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

          Request.prototype.end = function(fn){
            var self = this;
            var xhr = this.xhr = request.getXHR();
            var query = this._query.join('&');
            var timeout = this._timeout;
          Severity: Major
          Found in cmis_web/static/lib/cmisjs/superagent.7.2.0.js - About 2 hrs to fix

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

            function webViewerNamedAction(evt) {
              var action = evt.action;
              switch (action) {
                case 'GoToPage':
                  PDFViewerApplication.appConfig.toolbar.pageNumber.select();
            Severity: Major
            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 hrs to fix
            cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2072..2084

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

            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

            function webViewerNamedAction(evt) {
              var action = evt.action;
              switch (action) {
                case 'GoToPage':
                  PDFViewerApplication.appConfig.toolbar.pageNumber.select();
            Severity: Major
            Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js and 1 other location - About 2 hrs to fix
            cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js on lines 2065..2077

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

            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

            function isDataSchema(url) {
              var i = 0,
                  ii = url.length;
              while (i < ii && url[i].trim() === '') {
                i++;
            Severity: Major
            Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js and 1 other location - About 2 hrs to fix
            cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js on lines 346..353

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

            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

            function isDataSchema(url) {
              var i = 0,
                  ii = url.length;
              while (i < ii && url[i].trim() === '') {
                i++;
            Severity: Major
            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 hrs to fix
            cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 346..353

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

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

            function getVisibleElements(scrollEl, views) {
              var sortByVisibility = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
            
              var top = scrollEl.scrollTop,
                  bottom = top + scrollEl.clientHeight;
            Severity: Major
            Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 2 hrs to fix

              Function getVisibleElements has 59 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function getVisibleElements(scrollEl, views) {
                var sortByVisibility = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
              
                var top = scrollEl.scrollTop,
                    bottom = top + scrollEl.clientHeight;
              Severity: Major
              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 hrs to fix

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

                    session.getFolderParent = function (folderId, options) {
                      options = _fill(options);
                      options.cmisselector = 'parent';
                      options.objectId = folderId;
                      return new CmisRequest(_get(session.defaultRepository.rootFolderUrl)
                Severity: Major
                Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 4 other locations - About 2 hrs to fix
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 625..631
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 652..658
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 716..722
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 730..736

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

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

                    session.deleteType = function (typeId, options) {
                      options = _fill(options);
                      options.cmisaction = 'deleteType';
                      options.typeId = typeId;
                      return new CmisRequest(_post(session.defaultRepository.repositoryUrl)
                Severity: Major
                Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 4 other locations - About 2 hrs to fix
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 652..658
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 702..708
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 716..722
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 730..736

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

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

                    session.getChildren = function (objectId, options) {
                      options = _fill(options);
                      options.cmisselector = 'children';
                      options.objectId = objectId;
                      return new CmisRequest(_get(session.defaultRepository.rootFolderUrl)
                Severity: Major
                Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 4 other locations - About 2 hrs to fix
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 625..631
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 702..708
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 716..722
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 730..736

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

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

                    session.getParents = function (objectId, options) {
                      options = _fill(options);
                      options.cmisselector = 'parents';
                      options.objectId = objectId;
                      return new CmisRequest(_get(session.defaultRepository.rootFolderUrl)
                Severity: Major
                Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 4 other locations - About 2 hrs to fix
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 625..631
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 652..658
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 702..708
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 730..736

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

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

                    session.checkOut = function (objectId, options) {
                      var options = _fill(options);
                      options.objectId = objectId;
                      options.cmisaction = 'checkOut';
                      return new CmisRequest(_post(session.defaultRepository.rootFolderUrl)
                Severity: Major
                Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 4 other locations - About 2 hrs to fix
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 929..935
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 992..999
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 1056..1063
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 1093..1100

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

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

                    session.getAllVersions = function (versionSeriesId, options) {
                      var options = _fill(options);
                      options.versionSeriesId = versionSeriesId;
                      options.cmisselector = 'versions';
                      return new CmisRequest(_get(session.defaultRepository.rootFolderUrl)
                Severity: Major
                Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js and 4 other locations - About 2 hrs to fix
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 929..935
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 977..984
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 992..999
                cmis_web/static/lib/cmisjs/cmis.0.3.1.js on lines 1093..1100

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

                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