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 6 days to fix
cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 5146..5241

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

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 6 days to fix
cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js on lines 5139..5234

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

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 BasePreferences = function () {
  function BasePreferences() {
    var _this = this;

    _classCallCheck(this, BasePreferences);
Severity: Major
Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 5 days to fix
cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 9010..9118

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

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 BasePreferences = function () {
  function BasePreferences() {
    var _this = this;

    _classCallCheck(this, BasePreferences);
Severity: Major
Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js and 1 other location - About 5 days to fix
cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js on lines 9002..9110

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

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 5 days to fix
cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js on lines 3523..3597

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

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/viewer.js and 1 other location - About 5 days to fix
cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 3530..3604

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

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/viewer.js and 1 other location - About 4 days to fix
cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 4724..4806

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

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 4 days to fix
cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js on lines 4717..4799

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

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 ProgressBar = function () {
  function ProgressBar(id) {
    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
        height = _ref.height,
        width = _ref.width,
Severity: Major
Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 4 days to fix
cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 455..531

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

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 ProgressBar = function () {
  function ProgressBar(id) {
    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
        height = _ref.height,
        width = _ref.width,
Severity: Major
Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js and 1 other location - About 4 days to fix
cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js on lines 455..531

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

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

  lib.createSession = function (url) {

    /**
     * @class CmisSession
     *
Severity: Major
Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 3 days to fix

    Similar blocks of code found in 2 locations. 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 and 1 other location - About 3 days to fix
    cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js on lines 281..342

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

    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 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 and 1 other location - About 3 days to fix
    cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 281..342

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

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

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

      Function webL10n has 724 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      document.webL10n = function (window, document, undefined) {
        var gL10nData = {};
        var gTextData = '';
        var gTextProp = 'textContent';
        var gLanguage = '';
      Severity: Major
      Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 3 days to fix

        Function webL10n has 724 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        document.webL10n = function (window, document, undefined) {
          var gL10nData = {};
          var gTextData = '';
          var gTextProp = 'textContent';
          var gLanguage = '';
        Severity: Major
        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 days to fix

          Function PDFViewer has 724 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

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

            /******/ (function(modules) { // webpackBootstrap
            /******/     // The module cache
            /******/     var installedModules = {};
            /******/
            /******/     // The require function
            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 16..10191

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

            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(modules) { // webpackBootstrap
            /******/     // The module cache
            /******/     var installedModules = {};
            /******/
            /******/     // The require function
            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 16..10199

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

            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 form_widgets.js has 1249 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*---------------------------------------------------------
             + * Odoo cmis_web
             + * Author  Laurent Mignon 2016 Acsone SA/NV
             + * License in __openerp__.py at root level of the module
             + *---------------------------------------------------------
            Severity: Major
            Found in cmis_web/static/src/js/form_widgets.js - About 3 days to fix
              Severity
              Category
              Status
              Source
              Language