acsone/alfodoo

View on GitHub

Showing 321 of 538 total issues

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/viewer.js - About 4 hrs to fix

    Function _initializeViewerComponents has 102 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      _initializeViewerComponents: function _initializeViewerComponents() {
        var _this2 = this;
    
        var appConfig = this.appConfig;
        return new Promise(function (resolve, reject) {
    Severity: Major
    Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 4 hrs to fix

      Function _initializeViewerComponents has 102 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        _initializeViewerComponents: function _initializeViewerComponents() {
          var _this2 = this;
      
          var appConfig = this.appConfig;
          return new Promise(function (resolve, reject) {
      Severity: Major
      Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 4 hrs to fix

        Function PDFCursorTools has 100 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var PDFCursorTools = function () {
          function PDFCursorTools(_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 4 hrs to fix

          Function PDFCursorTools has 100 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Function BasePreferences has 99 lines of code (exceeds 25 allowed). 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 - About 3 hrs to fix

              Function scrollPageIntoView has 99 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  value: function scrollPageIntoView(params) {
                    if (!this.pdfDocument) {
                      return;
                    }
                    if (arguments.length > 1 || typeof params === 'number') {
              Severity: Major
              Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 3 hrs to fix

                Function BasePreferences has 99 lines of code (exceeds 25 allowed). 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 - About 3 hrs to fix

                  Function scrollPageIntoView has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      value: function scrollPageIntoView(params) {
                        if (!this.pdfDocument) {
                          return;
                        }
                        if (arguments.length > 1 || typeof params === 'number') {
                  Severity: Major
                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 hrs to fix

                    Function webViewerInitialized has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function webViewerInitialized() {
                      var appConfig = PDFViewerApplication.appConfig;
                      var file = void 0;
                      var queryString = document.location.search.substring(1);
                      var params = (0, _ui_utils.parseQueryString)(queryString);
                    Severity: Major
                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 3 hrs to fix

                      Function PDFBugClosure has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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

                        Function webViewerInitialized has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function webViewerInitialized() {
                          var appConfig = PDFViewerApplication.appConfig;
                          var file = void 0;
                          var queryString = document.location.search.substring(1);
                          var params = (0, _ui_utils.parseQueryString)(queryString);
                        Severity: Major
                        Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 hrs to fix

                          Function setDocument has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              value: function setDocument(pdfDocument) {
                                var _this = this;
                          
                                if (this.pdfDocument) {
                                  this._cancelRendering();
                          Severity: Major
                          Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 3 hrs to fix

                            Function setDocument has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                value: function setDocument(pdfDocument) {
                                  var _this = this;
                            
                                  if (this.pdfDocument) {
                                    this._cancelRendering();
                            Severity: Major
                            Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 hrs to fix

                              Function attachDOMEventsToEventBus has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function attachDOMEventsToEventBus(eventBus) {
                                eventBus.on('documentload', function () {
                                  var event = document.createEvent('CustomEvent');
                                  event.initCustomEvent('documentload', true, true, {});
                                  window.dispatchEvent(event);
                              Severity: Major
                              Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 3 hrs to fix

                                Function attachDOMEventsToEventBus has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function attachDOMEventsToEventBus(eventBus) {
                                  eventBus.on('documentload', function () {
                                    var event = document.createEvent('CustomEvent');
                                    event.initCustomEvent('documentload', true, true, {});
                                    window.dispatchEvent(event);
                                Severity: Major
                                Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 hrs to fix

                                  Function FontInspectorClosure has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  var FontInspector = (function FontInspectorClosure() {
                                    var fonts;
                                    var active = false;
                                    var fontAttribute = 'data-font-name';
                                    function removeSelection() {
                                  Severity: Minor
                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/debugger.js - About 3 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 pdfHistoryInitialize has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    initialize: function pdfHistoryInitialize(fingerprint) {
                                      this.initialized = true;
                                      this.reInitialized = false;
                                      this.allowHashChange = true;
                                      this.historyUnlocked = true;
                                  Severity: Major
                                  Found in cmis_web/static/lib/pdfjs-1.9.426/web/odoo-viewer.js - About 3 hrs to fix

                                    Function pdfHistoryInitialize has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      initialize: function pdfHistoryInitialize(fingerprint) {
                                        this.initialized = true;
                                        this.reInitialized = false;
                                        this.allowHashChange = true;
                                        this.historyUnlocked = true;
                                    Severity: Major
                                    Found in cmis_web/static/lib/pdfjs-1.9.426/web/viewer.js - About 3 hrs to fix

                                      Function gen_dict_extract has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      def gen_dict_extract(key, var):
                                          """ This method is used to recusrively find into a json structure (dict)
                                          all values of a given key
                                          credits: http://stackoverflow.com/questions/9807634/
                                          find-all-occurences-of-a-key-in-nested-python-dictionaries-and-lists
                                      Severity: Minor
                                      Found in cmis_web_proxy/controllers/cmis.py - About 3 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

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language