Showing 321 of 538 total issues
Function load
has 171 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
load: function load(pdfDocument, scale) {
var _this6 = this;
scale = scale || _ui_utils.UNKNOWN_SCALE;
this.pdfDocument = pdfDocument;
Function load
has 171 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
load: function load(pdfDocument, scale) {
var _this6 = this;
scale = scale || _ui_utils.UNKNOWN_SCALE;
this.pdfDocument = pdfDocument;
Function PDFFindBar
has 170 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFFindBar = function () {
function PDFFindBar(options) {
var _this = this;
var l10n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _ui_utils.NullL10n;
Function PDFFindBar
has 170 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFFindBar = function () {
function PDFFindBar(options) {
var _this = this;
var l10n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _ui_utils.NullL10n;
Function PDFOutlineViewer
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFOutlineViewer = function () {
function PDFOutlineViewer(_ref) {
var container = _ref.container,
linkService = _ref.linkService,
eventBus = _ref.eventBus;
Function PDFOutlineViewer
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFOutlineViewer = function () {
function PDFOutlineViewer(_ref) {
var container = _ref.container,
linkService = _ref.linkService,
eventBus = _ref.eventBus;
File cmis.py
has 392 lines of code (exceeds 250 allowed). Consider refactoring. Open
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
Function FontInspectorClosure
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var FontInspector = (function FontInspectorClosure() {
var fonts;
var active = false;
var fontAttribute = 'data-font-name';
function removeSelection() {
Function PDFAttachmentViewer
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFAttachmentViewer = function () {
function PDFAttachmentViewer(_ref) {
var container = _ref.container,
eventBus = _ref.eventBus,
downloadManager = _ref.downloadManager;
Function PDFAttachmentViewer
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFAttachmentViewer = function () {
function PDFAttachmentViewer(_ref) {
var container = _ref.container,
eventBus = _ref.eventBus,
downloadManager = _ref.downloadManager;
Function PDFBugClosure
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
Open
window.PDFBug = (function PDFBugClosure() {
var panelWidth = 300;
var buttons = [];
var activePanel = null;
- Read upRead up
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
Open
function getViewerConfiguration() {
return {
appContainer: document.body,
mainContainer: document.getElementById('viewerContainer'),
viewerContainer: document.getElementById('viewer'),
Function OverlayManager
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var OverlayManager = function () {
function OverlayManager() {
_classCallCheck(this, OverlayManager);
this._overlays = {};
Function getViewerConfiguration
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getViewerConfiguration() {
return {
appContainer: document.body,
mainContainer: document.getElementById('viewerContainer'),
viewerContainer: document.getElementById('viewer'),
Function OverlayManager
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var OverlayManager = function () {
function OverlayManager() {
_classCallCheck(this, OverlayManager);
this._overlays = {};
Function PDFRenderingQueue
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFRenderingQueue = function () {
function PDFRenderingQueue() {
_classCallCheck(this, PDFRenderingQueue);
this.pdfViewer = null;
Function PDFRenderingQueue
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFRenderingQueue = function () {
function PDFRenderingQueue() {
_classCallCheck(this, PDFRenderingQueue);
this.pdfViewer = null;
Function ViewHistory
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
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;
Function ViewHistory
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
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;
Function draw
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
value: function draw() {
var _this = this;
if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) {
console.error('Must be in new state before drawing');