Showing 377 of 529 total issues
Function pdfjsWrapper
has a Cognitive Complexity of 1973 (exceeds 5 allowed). Consider refactoring. Open
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it
'use strict';
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
- 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 pdfjsWrapper
has 5257 lines of code (exceeds 25 allowed). Consider refactoring. Open
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it
'use strict';
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
File pdf.js
has 5275 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2012 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
File viewer.js
has 4599 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2012 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
Function webL10n
has a Cognitive Complexity of 367 (exceeds 5 allowed). Consider refactoring. Open
document.webL10n = (function(window, document, undefined) {
var gL10nData = {};
var gTextData = '';
var gTextProp = 'textContent';
var gLanguage = '';
- 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 CanvasGraphicsClosure
has 1391 lines of code (exceeds 25 allowed). Consider refactoring. Open
var CanvasGraphics = (function CanvasGraphicsClosure() {
// Defines the time the executeOperatorList is going to be executing
// before it stops and shedules a continue of execution.
var EXECUTION_TIME = 15;
File en-US.js
has 2332 lines of code (exceeds 250 allowed). Consider refactoring. Open
if (window.i18n == undefined) window.i18n = {};
// Generated by CoffeeScript 1.3.3
(function() {
i18n.date = {
Function webL10n
has 776 lines of code (exceeds 25 allowed). Consider refactoring. Open
document.webL10n = (function(window, document, undefined) {
var gL10nData = {};
var gTextData = '';
var gTextProp = 'textContent';
var gLanguage = '';
File de-CH.js
has 1218 lines of code (exceeds 250 allowed). Consider refactoring. Open
if (window.i18n == undefined) window.i18n = {};
// Generated by CoffeeScript 1.3.3
(function() {
i18n.date = {
File en-GB.js
has 1174 lines of code (exceeds 250 allowed). Consider refactoring. Open
if (window.i18n == undefined) window.i18n = {};
// Generated by CoffeeScript 1.3.3
(function() {
i18n.date = {
Method hash_for_media_resource
has a Cognitive Complexity of 135 (exceeds 5 allowed). Consider refactoring. Open
def hash_for_media_resource(media_resource, with = nil)
h = {
id: media_resource.id,
created_at: media_resource.created_at.iso8601,
updated_at: media_resource.updated_at.iso8601,
- 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 pageView
has 544 lines of code (exceeds 25 allowed). Consider refactoring. Open
var PageView = function pageView(container, id, scale,
navigateTo, defaultViewport) {
this.id = id;
this.rotation = 0;
Function pageView
has a Cognitive Complexity of 133 (exceeds 5 allowed). Consider refactoring. Open
var PageView = function pageView(container, id, scale,
navigateTo, defaultViewport) {
this.id = id;
this.rotation = 0;
- 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 gsw-CH.js
has 875 lines of code (exceeds 250 allowed). Consider refactoring. Open
if (window.i18n == undefined) window.i18n = {};
// Generated by CoffeeScript 1.3.3
(function() {
i18n.date = {
Function textLayerBuilder
has a Cognitive Complexity of 100 (exceeds 5 allowed). Consider refactoring. Open
var TextLayerBuilder = function textLayerBuilder(options) {
var textLayerFrag = document.createDocumentFragment();
this.textLayerDiv = options.textLayerDiv;
this.layoutDone = false;
- 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 getPluralRules
has 385 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getPluralRules(lang) {
var locales2rules = {
'af': 3,
'ak': 4,
'am': 4,
File l10n.js
has 779 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Copyright (c) 2011-2013 Fabien Cazenave, Mozilla.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
Function WorkerTransportClosure
has 356 lines of code (exceeds 25 allowed). Consider refactoring. Open
var WorkerTransport = (function WorkerTransportClosure() {
function WorkerTransport(workerInitializedCapability, workerReadyCapability,
pdfDataRangeTransport, progressCallback) {
this.pdfDataRangeTransport = pdfDataRangeTransport;
Function WebGLUtilsClosure
has 347 lines of code (exceeds 25 allowed). Consider refactoring. Open
var WebGLUtils = (function WebGLUtilsClosure() {
function loadShader(gl, code, shaderType) {
var shader = gl.createShader(shaderType);
gl.shaderSource(shader, code);
gl.compileShader(shader);
Function keydown
has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring. Open
window.addEventListener('keydown', function keydown(evt) {
if (OverlayManager.active) {
return;
}
- 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"