Showing 218 of 386 total issues
Function getRegionSliceIterator
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
image, index, isRescaled, min, max) {
Function decodeMcu
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function decodeMcu(component, decode, mcu, row, col) {
Function arrayContains
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function arrayContains(arr0, arr1) {
// check input
if (arr0 === null ||
arr1 === null ||
typeof arr0 === 'undefined' ||
- 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 getSuvFactor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function getSuvFactor(elements) {
let warning = '';
// CorrectedImage (type2): must contain ATTN and DECY
const corrImageTagStr = 'Corrected Image (00280051)';
- 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 getFileExtension
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function getFileExtension(filePath) {
let ext = null;
if (typeof filePath !== 'undefined' &&
filePath !== null &&
filePath[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
Avoid too many return
statements within this function. Open
return (0xFF00 | this.marker) << 8;
Avoid too many return
statements within this function. Open
return (0xFF00 | this.marker) << 8;
Avoid too many return
statements within this function. Open
return value + 37;
Avoid too many return
statements within this function. Open
return this._convertCmykToRgb(data);
Avoid too many return
statements within this function. Open
return result;
Avoid too many return
statements within this function. Open
return data;
Function dcmdump
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function dcmdump(dicomElements) {
const keys = Object.keys(dicomElements);
let result = '\n';
result += '# Dicom-File-Format\n';
result += '\n';
- 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 simpleRange3d
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function simpleRange3d(
dataAccessor, start, end, increment, isPlanar) {
if (typeof increment === 'undefined') {
increment = 1;
}
- 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 getRegionSliceIterator
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function getRegionSliceIterator(
image, index, isRescaled, min, max) {
if (image.getNumberOfComponents() !== 1) {
throw new Error('Unsupported number of components for region iterator: ' +
image.getNumberOfComponents());
- 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 isEqualSegmentFrameInfo
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function isEqualSegmentFrameInfo(dsfi1, dsfi2) {
// basics
if (typeof dsfi1 === 'undefined' ||
typeof dsfi2 === 'undefined' ||
dsfi1 === 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 getDicomSegmentFrameInfoItem
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function getDicomSegmentFrameInfoItem(frameInfo) {
const item = {
FrameContentSequence: {
value: [
{
- 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 getTime
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function getTime(element) {
if (typeof element === 'undefined') {
return undefined;
}
if (element.value.length !== 1) {
- 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 toString
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
toString(prefix) {
if (typeof prefix === 'undefined') {
prefix = '';
}
- 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"