acsone/alfodoo

View on GitHub

Showing 538 of 538 total issues

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

/***/ (function(module, exports, __webpack_require__) {

"use strict";


Severity: Major
Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 3 days to fix
cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 4808..4866

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

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(module, exports, __webpack_require__) {

"use strict";


Severity: Major
Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js and 1 other location - About 3 days to fix
cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js on lines 4801..4859

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

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

var PDFPageView = function () {
  function PDFPageView(options) {
    _classCallCheck(this, PDFPageView);

    var container = options.container;
Severity: Major
Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 2 days to fix

    Function PDFPageView has 488 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var PDFPageView = function () {
      function PDFPageView(options) {
        _classCallCheck(this, PDFPageView);
    
        var container = options.container;
    Severity: Major
    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 2 days to fix

      Function 3 has 458 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{}],3:[function(require,module,exports){
      /**
       * Module dependencies.
       */
      
      
      Severity: Major
      Found in cmis_web/static/lib/cmisjs/superagent.7.2.0.js - About 2 days to fix

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

        function webViewerWheel(evt) {
          var pdfViewer = PDFViewerApplication.pdfViewer;
          if (pdfViewer.isInPresentationMode) {
            return;
          }
        Severity: Major
        Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js and 1 other location - About 2 days to fix
        cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js on lines 2251..2290

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

        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 webViewerWheel(evt) {
          var pdfViewer = PDFViewerApplication.pdfViewer;
          if (pdfViewer.isInPresentationMode) {
            return;
          }
        Severity: Major
        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 2 days to fix
        cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2258..2297

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

        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

        var EventBus = function () {
          function EventBus() {
            _classCallCheck(this, EventBus);
        
            this._listeners = Object.create(null);
        Severity: Major
        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 day to fix
        cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 407..449

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

        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

        var EventBus = function () {
          function EventBus() {
            _classCallCheck(this, EventBus);
        
            this._listeners = Object.create(null);
        Severity: Major
        Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js and 1 other location - About 1 day to fix
        cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js on lines 407..449

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

        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

        File cmis.0.3.1.js has 794 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        ;
        (function (root, factory) {
          'use strict';
          if (typeof define === 'function' && define.amd) {
            define(['superagent'], function (superagent) {
        Severity: Major
        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 1 day to fix

          Function PDFFindController has 367 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var PDFFindController = function () {
            function PDFFindController(_ref) {
              var pdfViewer = _ref.pdfViewer;
          
              _classCallCheck(this, PDFFindController);
          Severity: Major
          Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 1 day to fix

            Function PDFFindController has 367 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var PDFFindController = function () {
              function PDFFindController(_ref) {
                var pdfViewer = _ref.pdfViewer;
            
                _classCallCheck(this, PDFFindController);
            Severity: Major
            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 day to fix

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

              function scrollIntoView(element, spot) {
                var skipOverflowHiddenElements = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
              
                var parent = element.offsetParent;
                if (!parent) {
              Severity: Major
              Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js and 1 other location - About 1 day to fix
              cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js on lines 150..182

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

              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 scrollIntoView(element, spot) {
                var skipOverflowHiddenElements = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
              
                var parent = element.offsetParent;
                if (!parent) {
              Severity: Major
              Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 day to fix
              cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 150..182

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

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

              var PDFPresentationMode = function () {
                function PDFPresentationMode(_ref) {
                  var _this = this;
              
                  var container = _ref.container,
              Severity: Major
              Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 1 day to fix

                Function PDFPresentationMode has 352 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var PDFPresentationMode = function () {
                  function PDFPresentationMode(_ref) {
                    var _this = this;
                
                    var container = _ref.container,
                Severity: Major
                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 day to fix

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

                  function approximateFraction(x) {
                    if (Math.floor(x) === x) {
                      return [x, 1];
                    }
                    var xinv = 1 / x;
                  Severity: Major
                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js and 1 other location - About 1 day to fix
                  cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js on lines 239..276

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

                  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 approximateFraction(x) {
                    if (Math.floor(x) === x) {
                      return [x, 1];
                    }
                    var xinv = 1 / x;
                  Severity: Major
                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 1 day to fix
                  cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 239..276

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

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

                    function getPluralRules(lang) {
                      var locales2rules = {
                        'af': 3,
                        'ak': 4,
                        'am': 4,
                  Severity: Major
                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 1 day to fix

                    Function getPluralRules has 321 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function getPluralRules(lang) {
                        var locales2rules = {
                          'af': 3,
                          'ak': 4,
                          'am': 4,
                    Severity: Major
                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 1 day to fix
                      Severity
                      Category
                      Status
                      Source
                      Language