Skip to content

Bad new file again again#92

Open
askonomm wants to merge 2 commits into
masterfrom
bad-new-file-again-again
Open

Bad new file again again#92
askonomm wants to merge 2 commits into
masterfrom
bad-new-file-again-again

Conversation

@askonomm
Copy link
Copy Markdown

@askonomm askonomm commented Oct 6, 2025

No description provided.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gates Failed
New code is healthy (1 new file with code health below 10.00)
Enforce advisory code health rules (1 file with Complex Method, Complex Conditional, Excess Number of Function Arguments)

Gates Passed
4 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
New code is healthy Violations Code Health Impact
new-file.ts 3 rules 8.68 Suppress
Enforce advisory code health rules Violations Code Health Impact
new-file.ts 3 advisory rules 8.68 Suppress

Quality Gate Profile: Custom Configuration
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

Comment thread src/client-2/new-file.ts
Comment on lines +2 to +24
export function complexFunction (a: number, b:number, c:number, d:number, e:number, f:number) {
if (a && b && c && d && e && f) {
const vars = [a, b, c, d, e, f];
for (let i = 0; i < 99; ++i) {
if (vars[i - 1] && vars[i] > var[i - 1]) {
console.log('case 1');
}
else if (vars[i - 1] && vars[i] == vars[i -1]) {
console.log('case 2');
}
else {
console.log('case 3);
}
}
}

if (a > f) {
return 'ok';
}
else {
return false;
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ New issue: Complex Method
complexFunction has a cyclomatic complexity of 14, threshold = 9

Suppress

Comment thread src/client-2/new-file.ts
@@ -0,0 +1,24 @@

export function complexFunction (a: number, b:number, c:number, d:number, e:number, f:number) {
if (a && b && c && d && e && f) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ New issue: Complex Conditional
complexFunction has 1 complex conditionals with 5 branches, threshold = 2

Suppress

Comment thread src/client-2/new-file.ts
Comment on lines +2 to +24
export function complexFunction (a: number, b:number, c:number, d:number, e:number, f:number) {
if (a && b && c && d && e && f) {
const vars = [a, b, c, d, e, f];
for (let i = 0; i < 99; ++i) {
if (vars[i - 1] && vars[i] > var[i - 1]) {
console.log('case 1');
}
else if (vars[i - 1] && vars[i] == vars[i -1]) {
console.log('case 2');
}
else {
console.log('case 3);
}
}
}

if (a > f) {
return 'ok';
}
else {
return false;
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ New issue: Excess Number of Function Arguments
complexFunction has 6 arguments, max arguments = 4

Suppress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants