acsone/alfodoo

View on GitHub

Showing 538 of 538 total issues

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

function roundToDivide(x, div) {
  var r = x % div;
  return r === 0 ? x : Math.round(x - r + div);
}
Severity: Minor
Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 45 mins to fix
cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 277..280

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

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 roundToDivide(x, div) {
  var r = x % div;
  return r === 0 ? x : Math.round(x - r + div);
}
Severity: Minor
Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js and 1 other location - About 45 mins to fix
cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js on lines 277..280

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

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

             datatable_container.on('dragover dragenter', function(e) {
                 datatable_container.addClass('is-dragover');
                 e.preventDefault();
                 e.stopPropagation();
             });
Severity: Minor
Found in cmis_web/static/src/js/form_widgets.js and 1 other location - About 40 mins to fix
cmis_web/static/src/js/form_widgets.js on lines 1155..1159

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

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

    _onZoomIn: function (e) {
        e.preventDefault();
        var scale = this.scale + ZOOM_STEP;
        this._zoom(scale);
    },
Severity: Minor
Found in cmis_web/static/src/js/document_viewer.js and 1 other location - About 40 mins to fix
cmis_web/static/src/js/document_viewer.js on lines 342..346

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

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

             datatable_container.on('dragleave dragend drop', function(e) {
                datatable_container.removeClass('is-dragover');
                e.preventDefault();
                e.stopPropagation();
             });
Severity: Minor
Found in cmis_web/static/src/js/form_widgets.js and 1 other location - About 40 mins to fix
cmis_web/static/src/js/form_widgets.js on lines 1150..1154

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

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

    _onZoomOut: function (e) {
        e.preventDefault();
        var scale = this.scale - ZOOM_STEP;
        this._zoom(scale);
    },
Severity: Minor
Found in cmis_web/static/src/js/document_viewer.js and 1 other location - About 40 mins to fix
cmis_web/static/src/js/document_viewer.js on lines 333..337

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

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 applyACL has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    session.applyACL = function (objectId, addACEs, removeACEs, propagation, options) {
Severity: Minor
Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

    Function appendContentStream has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        session.appendContentStream = function (objectId, content, isLastChunk, filename, options) {
    Severity: Minor
    Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

      Function deleteTree has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          session.deleteTree = function (objectId, allVersions, unfileObjects, continueOnFailure, options) {
      Severity: Minor
      Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

        Function createFolder has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            session.createFolder = function (parentId, input, policies, addACEs, removeACEs) {
        Severity: Minor
        Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

          Function getContentChanges has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              session.getContentChanges = function (changeLogToken, includeProperties, includePolicyIds, includeACL, options) {
          Severity: Minor
          Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

            Function createRelationship has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                session.createRelationship = function (properties, policies, addACEs, removeACEs, options) {
            Severity: Minor
            Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

              Function bulkUpdateProperties has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  session.bulkUpdateProperties = function (objectIds, properties, addSecondaryTypeIds, removeSecondaryTypeIds, options) {
              Severity: Minor
              Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

                Function getObjectRelationships has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    session.getObjectRelationships = function (objectId, includeSubRelationshipTypes, relationshipDirection, typeId, options) {
                Severity: Minor
                Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

                  Function setContentStream has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      session.setContentStream = function (objectId, content, overwriteFlag, filename, options) {
                  Severity: Minor
                  Found in cmis_web/static/lib/cmisjs/cmis.0.3.1.js - About 35 mins to fix

                    Function create_cmis_folder_from_template has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def create_cmis_folder_from_template(self, source_objectid,
                    Severity: Minor
                    Found in cmis_alf/models/cmis_backend.py - About 35 mins to fix

                      Function _check_cmis_content_access has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def _check_cmis_content_access(self, cmis_path, proxy_info, params,
                      Severity: Minor
                      Found in cmis_web_proxy/controllers/cmis.py - About 35 mins to fix

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

                        function webViewerScaleChanging(evt) {
                          PDFViewerApplication.toolbar.setPageScale(evt.presetValue, evt.scale);
                          PDFViewerApplication.pdfViewer.update();
                        }
                        Severity: Minor
                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js and 1 other location - About 35 mins to fix
                        cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js on lines 2231..2234

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

                        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 webViewerScaleChanging(evt) {
                          PDFViewerApplication.toolbar.setPageScale(evt.presetValue, evt.scale);
                          PDFViewerApplication.pdfViewer.update();
                        }
                        Severity: Minor
                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js and 1 other location - About 35 mins to fix
                        cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js on lines 2238..2241

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

                        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

                                r = requests.get(
                                    url, params=params,
                                    auth=(proxy_info['username'], proxy_info['password']))
                        Severity: Minor
                        Found in cmis_web_proxy/controllers/cmis.py and 1 other location - About 35 mins to fix
                        cmis_web_proxy/controllers/cmis.py on lines 281..283

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

                        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