MPDX-9121 Add Mutations to MHA #1539
CodeScene PR Check
Quality Gate Failed
Code Health Improved
(1 files improve in Code Health)
Gates Failed
Prevent hotspot decline
(1 hotspot with Complex Method)
Enforce advisory code health rules
(5 files with Complex Method)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Prevent hotspot decline | Violations | Code Health Impact | |
|---|---|---|---|
| Calculation.tsx | 1 rule in this hotspot | 8.58 → 8.51 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| CurrentBoardApproved.tsx | 1 advisory rule | 10.00 → 8.88 | Suppress |
| CurrentRequest.tsx | 1 advisory rule | 9.25 → 8.93 | Suppress |
| StatusCard.tsx | 1 advisory rule | 10.00 → 9.69 | Suppress |
| RequestPage.tsx | 1 advisory rule | 9.50 → 9.20 | Suppress |
| Calculation.tsx | 1 advisory rule | 8.58 → 8.51 | Suppress |
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| AdditionalSalaryRequestContext.tsx | 9.18 → 9.26 | Large Method |
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):
- Complex Method Calculation.tsx: Calculation:React.FC<CalculationProps> 🔥
- Complex Method CurrentBoardApproved.tsx: CurrentBoardApproved:React.FC<CurrentBoardApprovedProps>
- Complex Method CurrentRequest.tsx: CurrentRequest:React.FC<CurrentRequestProps>
- Complex Method RequestPage.tsx: RequestPage:React.FC
- Complex Method StatusCard.tsx: StatusCard:React.FC<StatusCardProps>
✅ Improving Code Health:
- Large Method AdditionalSalaryRequestContext.tsx: AdditionalSalaryRequestProvider:React.FC<Props> 🔥
- Large Method CurrentRequest.tsx: CurrentRequest:React.FC<CurrentRequestProps>
Annotations
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
CurrentRequest:React.FC<CurrentRequestProps> has a cyclomatic complexity of 14, 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.
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ No longer an issue: Large Method
CurrentRequest:React.FC<CurrentRequestProps> is no longer above the threshold for lines of code
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ Getting worse: Complex Method
Calculation:React.FC<CalculationProps> increases in cyclomatic complexity from 46 to 49, 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.
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
CurrentBoardApproved:React.FC<CurrentBoardApprovedProps> has a cyclomatic complexity of 15, 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.
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
StatusCard:React.FC<StatusCardProps> has a cyclomatic complexity of 10, 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.
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ Getting better: Large Method
AdditionalSalaryRequestProvider:React.FC<Props> decreases from 150 to 136 lines of code, threshold = 120. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ Getting worse: Complex Method
RequestPage:React.FC increases in cyclomatic complexity from 18 to 23, 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.