Skip to content
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Feb 17, 2025 in 30s

CodeScene PR Check

Quality Gate Failed

Gates Failed
Enforce advisory code health rules (2 files with Complex Method, Code Duplication)

Gates Passed
3 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce advisory code health rules Violations Code Health Impact
ChatConversation.spec.tsx 1 advisory rule 10.00 → 9.39 Suppress
ChatConversation.tsx 1 advisory rule 9.69 → 9.66 Suppress

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

Details

🚩 Declining Code Health (highest to lowest):

  • Code Duplication ChatConversation.spec.tsx
  • Complex Method ChatConversation.tsx: ChatConversation

Annotations

Check warning on line 90 in web/src/components/ChatConversation.tsx

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

ChatConversation increases in cyclomatic complexity from 10 to 12, threshold = 10. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 159 in web/src/components/__tests__/ChatConversation.spec.tsx

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Code Duplication

The module contains 2 functions with similar structure: 'should display icon after isAutomaticAnswer changes','should not display icon isAutomaticAnswer does not change'. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.