Showing 119 of 303 total issues
Function drawSegment
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
[ay, ax]: [number, number],
[by, bx]: [number, number],
color: string,
scale: number,
ctx: any
Function drawSegment
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function drawSegment([ay, ax], [by, bx], color, scale, ctx) {
Function drawPoint
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function drawPoint(ctx, y, x, r, color) {
Function drawOffsetVectors
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
heatMapValues,
offsets,
outputStride,
scale = 1,
ctx
Function parseBody
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const parseBody = (body: any, table: string): any => {
const stringColumns = ["meta", "trim"];
const numberColumns = [
"missing",
"orientation",
- 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 detectAcdUploadModeAndId
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
async detectAcdUploadModeAndId(
psRow: ProcessStateRow,
row: HashRow
): Promise<// [null | "override" | "upload", null | string, null | string, null | string]
any> {
- 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 lockKey
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static async lockKey(key: string, force: boolean = false) {
if (key === "") {
return;
}
let count = 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 setDatGuiPropertyCss
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function setDatGuiPropertyCss(propertyText, liCssString, spanCssString = "") {
const spans = document.getElementsByClassName("property-name");
for (let i = 0; i < spans.length; i++) {
const text = spans[i].textContent || spans[i].innerText;
if (text == propertyText) {
- 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 processFile
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
async processFile(): Promise<boolean> {
if (QueueHelper.operationWaitPromises.length > 100) {
await QueueHelper.waitOperationWaitPromises();
}
await ProcessHelper.waitCpuIdle(this.config.maxCpuLoadPercent);
- 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 logResult
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
logResult(
{ from_path: fromPath, size, width, height, p_hash: pHash }: FileInfo,
result: JudgeResultSimple | JudgeResult
): JudgeResult {
let message = 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 loadTensorflowModule
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static loadTensorflowModule(backEnd: "cpu" | "gpu"): "cpu" | "gpu" {
let finalBackEnd: "gpu" | "cpu" = backEnd;
let tf;
if (DeepLearningHelper.isTensorflowModuleLoaded) {
return DeepLearningHelper.tfjsBackEnd;
- 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 null;
Avoid too many return
statements within this function. Open
return this.rl.logResult(fileInfo, [
TYPE_TRANSFER,
(await this.detectReplaceFile(fileInfo, storedFileInfoByPHashs)) ||
storedFileInfoByPHashs[0],
TYPE_FILE_MARK_TRANSFER
Avoid too many return
statements within this function. Open
return new Set([MARK_BLOCK]);
Avoid too many return
statements within this function. Open
return null;
Avoid too many return
statements within this function. Open
return this.rl.logResult(fileInfo, [TYPE_HOLD, null, TYPE_DEEP_LEARNING]);
Avoid too many return
statements within this function. Open
return fileInfo;
Avoid too many return
statements within this function. Open
return this.rl.logResult(fileInfo, [TYPE_SAVE, null, TYPE_NO_PROBLEM]);
Avoid too many return
statements within this function. Open
return [TYPE_SWEEP_DEDUPPER_FILE, TYPE_DELETE];
Avoid too many return
statements within this function. Open
return this.phl.handlePHashHit(fileInfo, storedFileInfoByPHashs);