Showing 218 of 386 total issues
Function LayerResolutionComponentPositionIterator
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function LayerResolutionComponentPositionIterator(context) {
var siz = context.SIZ;
var tileIndex = context.currentTile.index;
var tile = context.tiles[tileIndex];
var layersCount = tile.codingStyleDefaultParameters.layersCount;
Function BitModel_runMagnitudeRefinementPass
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function BitModel_runMagnitudeRefinementPass() {
var decoder = this.decoder;
var width = this.width, height = this.height;
var coefficentsMagnitude = this.coefficentsMagnitude;
var neighborsSignificance = this.neighborsSignificance;
Function runHandlers
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
runHandlers: function runHandlers() {
var RUN_TIMEOUT = 1; // ms
var timeoutAt = Date.now() + RUN_TIMEOUT;
while (this.handlers.length > 0) {
var handler = this.handlers.shift();
Function JpxImage_nextPacket
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.nextPacket = function JpxImage_nextPacket() {
// Section B.12.1.5 Component-position-resolution-layer
for (; c < componentsCount; ++c) {
var component = tile.components[c];
var precinctsIterationSizes = precinctsSizes.components[c];
Function decodeManifest
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function decodeManifest(manifest, nslices) {
const result = [];
// wado url
const wadoElement = manifest.getElementsByTagName('wado_query');
const wadoURL = wadoElement[0].getAttribute('wadoURL');
Function JpxImage_nextPacket
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.nextPacket = function JpxImage_nextPacket() {
// Section B.12.1.4 Position-component-resolution-layer
for (; py < precinctsIterationSizes.maxNumHigh; py++) {
for (; px < precinctsIterationSizes.maxNumWide; px++) {
for (; c < componentsCount; c++) {
Function BitModel_setNeighborsSignificance
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function BitModel_setNeighborsSignificance(row, column, index) {
var neighborsSignificance = this.neighborsSignificance;
var width = this.width, height = this.height;
var left = (column > 0);
var right = (column + 1 < width);
Function getScoordFromShape
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export function getScoordFromShape(shape) {
const scoord = new SpatialCoordinate();
if (shape instanceof Point2D) {
scoord.graphicData = [
- 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 splitKeyValueString
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export function splitKeyValueString(inputStr) {
// result
const result = {};
// check input string
if (inputStr) {
- 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 getVectorStringLPS
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function getVectorStringLPS(vector) {
let abs = new Vector3D(
Math.abs(vector.getX()),
Math.abs(vector.getY()),
Math.abs(vector.getZ())
- 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 combineUrl
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function combineUrl(baseUrl, url) {
if (!url) {
return baseUrl;
}
if (/^[a-z][a-z0-9+\-.]*:/i.test(url)) {
- 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 getVectorStringLPS
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getVectorStringLPS(vector) {
let abs = new Vector3D(
Math.abs(vector.getX()),
Math.abs(vector.getY()),
Math.abs(vector.getZ())
Function buildHuffTable
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
jpeg.lossless.HuffmanTable.prototype.buildHuffTable = function(tab, L, V) {
/*jslint bitwise: true */
var currentTable, temp, k, i, j, n;
temp = 256;
Function getViewFromDOMImage
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function getViewFromDOMImage(domImage, origin, index) {
// image size
const width = domImage.width;
const height = domImage.height;
Function dcmdump
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function dcmdump(dicomElements) {
const keys = Object.keys(dicomElements);
let result = '\n';
result += '# Dicom-File-Format\n';
result += '\n';
Function isEqualSegmentFrameInfo
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function isEqualSegmentFrameInfo(dsfi1, dsfi2) {
// basics
if (typeof dsfi1 === 'undefined' ||
typeof dsfi2 === 'undefined' ||
dsfi1 === null ||
Function isEqualSegment
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function isEqualSegment(seg1, seg2) {
// basics
if (typeof seg1 === 'undefined' ||
typeof seg2 === 'undefined' ||
seg1 === null ||
Function rangeRegions
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function rangeRegions(
dataAccessor, start, end, increment, regions) {
let nextIndex = start;
let regionCount = 0;
let regionElementCount = 0;
Function buildHuffmanTable
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function buildHuffmanTable(codeLengths, values) {
var k = 0, code = [], i, j, length = 16;
while (length > 0 && !codeLengths[length - 1]) {
length--;
}
Function read
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
jpeg.lossless.ScanHeader.prototype.read = function(data) {
/*jslint bitwise: true */
var count = 0, length, i, temp;