acsone/alfodoo

View on GitHub

Showing 321 of 538 total issues

Function load has 171 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  load: function load(pdfDocument, scale) {
    var _this6 = this;

    scale = scale || _ui_utils.UNKNOWN_SCALE;
    this.pdfDocument = pdfDocument;
Severity: Major
Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 6 hrs to fix

    Function load has 171 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      load: function load(pdfDocument, scale) {
        var _this6 = this;
    
        scale = scale || _ui_utils.UNKNOWN_SCALE;
        this.pdfDocument = pdfDocument;
    Severity: Major
    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 6 hrs to fix

      Function PDFFindBar has 170 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var PDFFindBar = function () {
        function PDFFindBar(options) {
          var _this = this;
      
          var l10n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _ui_utils.NullL10n;
      Severity: Major
      Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 6 hrs to fix

        Function PDFFindBar has 170 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var PDFFindBar = function () {
          function PDFFindBar(options) {
            var _this = this;
        
            var l10n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _ui_utils.NullL10n;
        Severity: Major
        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 6 hrs to fix

          Function PDFOutlineViewer has 147 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var PDFOutlineViewer = function () {
            function PDFOutlineViewer(_ref) {
              var container = _ref.container,
                  linkService = _ref.linkService,
                  eventBus = _ref.eventBus;
          Severity: Major
          Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 5 hrs to fix

            Function PDFOutlineViewer has 147 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var PDFOutlineViewer = function () {
              function PDFOutlineViewer(_ref) {
                var container = _ref.container,
                    linkService = _ref.linkService,
                    eventBus = _ref.eventBus;
            Severity: Major
            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 5 hrs to fix

              File cmis.py has 392 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              # -*- coding: utf-8 -*-
              # Copyright 2016 ACSONE SA/NV (<http://acsone.eu>)
              # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
              import json
              import logging
              Severity: Minor
              Found in cmis_web_proxy/controllers/cmis.py - About 5 hrs to fix

                Function FontInspectorClosure has 135 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var FontInspector = (function FontInspectorClosure() {
                  var fonts;
                  var active = false;
                  var fontAttribute = 'data-font-name';
                  function removeSelection() {
                Severity: Major
                Found in cmis_web/static/lib/pdfjs-1.9.426/web/debugger.js - About 5 hrs to fix

                  Function PDFAttachmentViewer has 123 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var PDFAttachmentViewer = function () {
                    function PDFAttachmentViewer(_ref) {
                      var container = _ref.container,
                          eventBus = _ref.eventBus,
                          downloadManager = _ref.downloadManager;
                  Severity: Major
                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 4 hrs to fix

                    Function PDFAttachmentViewer has 123 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var PDFAttachmentViewer = function () {
                      function PDFAttachmentViewer(_ref) {
                        var container = _ref.container,
                            eventBus = _ref.eventBus,
                            downloadManager = _ref.downloadManager;
                    Severity: Major
                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 4 hrs to fix

                      Function PDFBugClosure has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                      Open

                      window.PDFBug = (function PDFBugClosure() {
                        var panelWidth = 300;
                        var buttons = [];
                        var activePanel = null;
                      
                      
                      Severity: Minor
                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/debugger.js - About 4 hrs to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function getViewerConfiguration has 109 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function getViewerConfiguration() {
                        return {
                          appContainer: document.body,
                          mainContainer: document.getElementById('viewerContainer'),
                          viewerContainer: document.getElementById('viewer'),
                      Severity: Major
                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 4 hrs to fix

                        Function OverlayManager has 109 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        var OverlayManager = function () {
                          function OverlayManager() {
                            _classCallCheck(this, OverlayManager);
                        
                            this._overlays = {};
                        Severity: Major
                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 4 hrs to fix

                          Function getViewerConfiguration has 109 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function getViewerConfiguration() {
                            return {
                              appContainer: document.body,
                              mainContainer: document.getElementById('viewerContainer'),
                              viewerContainer: document.getElementById('viewer'),
                          Severity: Major
                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 4 hrs to fix

                            Function OverlayManager has 109 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            var OverlayManager = function () {
                              function OverlayManager() {
                                _classCallCheck(this, OverlayManager);
                            
                                this._overlays = {};
                            Severity: Major
                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 4 hrs to fix

                              Function PDFRenderingQueue has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              var PDFRenderingQueue = function () {
                                function PDFRenderingQueue() {
                                  _classCallCheck(this, PDFRenderingQueue);
                              
                                  this.pdfViewer = null;
                              Severity: Major
                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 4 hrs to fix

                                Function PDFRenderingQueue has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                var PDFRenderingQueue = function () {
                                  function PDFRenderingQueue() {
                                    _classCallCheck(this, PDFRenderingQueue);
                                
                                    this.pdfViewer = null;
                                Severity: Major
                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 4 hrs to fix

                                  Function ViewHistory has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  var ViewHistory = function () {
                                    function ViewHistory(fingerprint) {
                                      var _this = this;
                                  
                                      var cacheSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_VIEW_HISTORY_CACHE_SIZE;
                                  Severity: Major
                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 4 hrs to fix

                                    Function ViewHistory has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    var ViewHistory = function () {
                                      function ViewHistory(fingerprint) {
                                        var _this = this;
                                    
                                        var cacheSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_VIEW_HISTORY_CACHE_SIZE;
                                    Severity: Major
                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 4 hrs to fix

                                      Function draw has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          value: function draw() {
                                            var _this = this;
                                      
                                            if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) {
                                              console.error('Must be in new state before drawing');
                                      Severity: Major
                                      Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 4 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language