Showing 209 of 399 total issues
Avoid deeply nested control flow statements. Open
for (pos = c, j = 0, jj = items.length; j < jj; j++) {
val = items[j];
out[pos] = val <= min ? 0 :
val >= max ? 255 : (val + offset) >> shift;
pos += componentsCount;
Avoid deeply nested control flow statements. Open
if(isSigned){
shift = 0;
offset = 0;
}else{
shift = components[c].precision - 8;
Avoid deeply nested control flow statements. Open
if ((value >> 4) === 0) {
break;
}
Avoid deeply nested control flow statements. Open
for (b = 0; b < numBuffers; b++) {
colBuffers[b][l] = items[k + b];
}
Avoid deeply nested control flow statements. Open
while (true) {
if (readBits(1)) {
valueReady = !inclusionTree.nextLevel();
if (valueReady) {
codeblock.included = true;
Avoid deeply nested control flow statements. Open
for (pos = c, j = 0, jj = items.length; j < jj; j++) {
val = items[j];
out[pos] = (val + offset);
pos += componentsCount;
}
Function simpleRange3d
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
dataAccessor, start, end, increment, isPlanar) {
Function getRegionSliceIterator
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
image, index, isRescaled, min, max) {
Function getPrecinctIndexIfExist
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
pxIndex, pyIndex, sizeInImageScale, precinctIterationSizes, resolution) {
Function generateImageDataPaletteColor
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
array,
iterator,
alphaFunc,
colourMap,
is16BitsStored) {
Function generateImageDataMonochrome
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
array,
iterator,
alphaFunc,
windowLut,
colourMap) {
Function rangeRegions
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
dataAccessor, start, end, increment, regions) {
Function BitModel
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function BitModel(width, height, subband, zeroBitPlanes, mb) {
Function decodeMcu
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function decodeMcu(component, decode, mcu, row, col) {
Function create
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
create(points, style, viewController) {
// physical shape
const line0 = new Line(points[0], points[1]);
// points stored the Konvajs way
const pointsArray = [];
- 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 a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
update(anchor, style, viewController) {
// parent group
const group = anchor.getParent();
// associated shape
const kline = group.getChildren(function (node) {
- 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 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 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 value + 37;
Avoid too many return
statements within this function. Open
return result;