Showing 321 of 538 total issues
Function PDFThumbnailView
has 295 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFThumbnailView = function () {
function PDFThumbnailView(_ref) {
var container = _ref.container,
id = _ref.id,
defaultViewport = _ref.defaultViewport,
Function PDFThumbnailView
has 295 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFThumbnailView = function () {
function PDFThumbnailView(_ref) {
var container = _ref.container,
id = _ref.id,
defaultViewport = _ref.defaultViewport,
Function TextLayerBuilder
has 287 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var TextLayerBuilder = function () {
function TextLayerBuilder(_ref) {
var textLayerDiv = _ref.textLayerDiv,
eventBus = _ref.eventBus,
pageIndex = _ref.pageIndex,
Function TextLayerBuilder
has 287 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var TextLayerBuilder = function () {
function TextLayerBuilder(_ref) {
var textLayerDiv = _ref.textLayerDiv,
eventBus = _ref.eventBus,
pageIndex = _ref.pageIndex,
Function PDFLinkService
has 273 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFLinkService = function () {
function PDFLinkService() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
eventBus = _ref.eventBus;
Function PDFLinkService
has 273 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFLinkService = function () {
function PDFLinkService() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
eventBus = _ref.eventBus;
Function StepperClosure
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
Open
var Stepper = (function StepperClosure() {
// Shorter way to create element and optionally set textContent.
function c(tag, textContent) {
var d = document.createElement(tag);
if (textContent) {
- 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
File debugger.js
has 562 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* Copyright 2012 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
File superagent.7.2.0.js
has 544 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.superagent = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/**
* Expose `Emitter`.
*/
Function webViewerKeyDown
has 221 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function webViewerKeyDown(evt) {
if (PDFViewerApplication.overlayManager.active) {
return;
}
var handled = false,
Function webViewerKeyDown
has 221 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function webViewerKeyDown(evt) {
if (PDFViewerApplication.overlayManager.active) {
return;
}
var handled = false,
Function SecondaryToolbar
has 193 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var SecondaryToolbar = function () {
function SecondaryToolbar(options, mainContainer, eventBus) {
_classCallCheck(this, SecondaryToolbar);
this.toolbar = options.toolbar;
Function SecondaryToolbar
has 193 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var SecondaryToolbar = function () {
function SecondaryToolbar(options, mainContainer, eventBus) {
_classCallCheck(this, SecondaryToolbar);
this.toolbar = options.toolbar;
Function Toolbar
has 192 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Toolbar = function () {
function Toolbar(options, mainContainer, eventBus) {
var l10n = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _ui_utils.NullL10n;
_classCallCheck(this, Toolbar);
Function Toolbar
has 192 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Toolbar = function () {
function Toolbar(options, mainContainer, eventBus) {
var l10n = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _ui_utils.NullL10n;
_classCallCheck(this, Toolbar);
Function PDFDocumentProperties
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFDocumentProperties = function () {
function PDFDocumentProperties(_ref, overlayManager) {
var overlayName = _ref.overlayName,
fields = _ref.fields,
container = _ref.container,
Function PDFDocumentProperties
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFDocumentProperties = function () {
function PDFDocumentProperties(_ref, overlayManager) {
var overlayName = _ref.overlayName,
fields = _ref.fields,
container = _ref.container,
Function StepperClosure
has 179 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Stepper = (function StepperClosure() {
// Shorter way to create element and optionally set textContent.
function c(tag, textContent) {
var d = document.createElement(tag);
if (textContent) {
Function PDFThumbnailViewer
has 178 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFThumbnailViewer = function () {
function PDFThumbnailViewer(_ref) {
var container = _ref.container,
linkService = _ref.linkService,
renderingQueue = _ref.renderingQueue,
Function PDFThumbnailViewer
has 178 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PDFThumbnailViewer = function () {
function PDFThumbnailViewer(_ref) {
var container = _ref.container,
linkService = _ref.linkService,
renderingQueue = _ref.renderingQueue,