Showing 209 of 399 total issues
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 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 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 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 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 update
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(anchor, style, _viewController) {
// parent group
const group = anchor.getParent();
// associated shape
const kroi = group.getChildren(function (node) {
Function update
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(anchor, style, _viewController) {
// parent group
const group = anchor.getParent();
// associated shape
const kline = group.getChildren(function (node) {
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 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 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 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 getData
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
getData: function getData(width, height, forceRGBoutput) {
if (this.numComponents > 4) {
throw 'Unsupported color mode';
}
// type of data: Uint8Array(width * height * numComponents)
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;
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 range3d
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
export function range3d(dataAccessor, start, maxIter, increment,
blockMaxIter, blockIncrement, reverse1, reverse2, isPlanar) {
Function decodeScan
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
function decodeScan(data, offset, frame, components, resetInterval,
spectralStart, spectralEnd, successivePrev, successive) {
Function getSuvFactor
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function getSuvFactor(elements) {
let warning = '';
// CorrectedImage (type2): must contain ATTN and DECY
const corrImageTagStr = 'Corrected Image (00280051)';