Showing 605 of 958 total issues
Function adjustOddEvenCounts
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
private adjustOddEvenCounts(numModules) {
let oddSum = MathUtils.sum(new Int32Array(this.getOddCounts()));
let evenSum = MathUtils.sum(new Int32Array(this.getEvenCounts()));
let incrementOdd = 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 lookAheadTestIntern
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
static lookAheadTestIntern(
msg: string,
startpos: number,
currentMode: number
): number {
Function find
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
public find(): AlignmentPattern /*throws NotFoundException*/ {
const startX = this.startX;
const height = this.height;
const width = this.width;
const maxJ = startX + width;
- 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 detect
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
public detect(): ResultPoint[] {
let left = this.leftInit;
let right = this.rightInit;
let up = this.upInit;
- 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 getEnclosingRectangle
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
public getEnclosingRectangle(): Int32Array {
const width = this.width;
const height = this.height;
const rowSize = this.rowSize;
const bits = this.bits;
- 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 Code128Reader.ts
has 430 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
File Version.ts
has 429 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
File FinderPatternFinder.ts
has 420 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Function decodeExtended
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
private static decodeExtended(encoded: string): string {
let length = encoded.length;
let decoded = '';
for (let i = 0; i < length; i++) {
let c = encoded.charAt(i);
- 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 decodeExtended
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
private decodeExtended(encoded: string): string {
let length = encoded.length;
let decoded = '';
for (let i = 0; i < length; i++) {
let c = encoded.charAt(i);
- 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 HighLevelEncoder.ts
has 405 lines of code (exceeds 250 allowed). Consider refactoring. Open
// tslint:disable-next-line:no-circular-imports
import { ASCIIEncoder } from './ASCIIEncoder';
// tslint:disable-next-line:no-circular-imports
import { Base256Encoder } from './Base256Encoder';
File Encoder.ts
has 405 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
File DecodedBitStreamParser.ts
has 404 lines of code (exceeds 250 allowed). Consider refactoring. Open
import DecoderResult from '../../common/DecoderResult';
import BitSource from '../../common/BitSource';
import StringBuilder from '../../util/StringBuilder';
import StringEncoding from '../../util/StringEncoding';
Function decodeTextCompaction
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static decodeTextCompaction(textCompactionData: Int32Array,
byteCompactionData: Int32Array,
length: int,
result: StringBuilder): void {
// Beginning from an initial state of the Alpha sub-mode
File PDF417Common.ts
has 398 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright 2009 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Function byteCompaction
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
private static /*int*/ byteCompaction(mode: int,
codewords: Int32Array,
encoding: /*Charset*/ CharacterSetECI,
codeIndex: int,
result: StringBuilder) {
- 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 getEncodedData
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
private static getEncodedData(correctedBits: boolean[]): string {
let endIndex: number = correctedBits.length;
let latchTable = Table.UPPER; // table most recently latched to
let shiftTable = Table.UPPER; // table to use for the next read
let result: string = '';
- 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 RSS14Reader.ts
has 377 lines of code (exceeds 250 allowed). Consider refactoring. Open
import AbstractRSSReader from './AbstractRSSReader';
import Pair from './Pair';
import Result from '../../Result';
import BitArray from '../../common/BitArray';
import DecodeHintType from '../../DecodeHintType';
File GeneralAppIdDecoder.ts
has 373 lines of code (exceeds 250 allowed). Consider refactoring. Open
import BitArray from '../../../../common/BitArray';
import FormatException from '../../../../FormatException';
import IllegalStateException from '../../../../IllegalStateException';
import StringBuilder from '../../../../util/StringBuilder';
import BlockParsedResult from './BlockParsedResult';
Function decode
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public static decode(image: BitMatrix,
imageTopLeft: ResultPoint,
imageBottomLeft: ResultPoint,
imageTopRight: ResultPoint,
imageBottomRight: ResultPoint,
- 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"