CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (master)
failed
Oct 20, 2023 in 39s
CodeScene PR Check
β Code Health Quality Gates: FAILED
- Declining Code Health: 4 findings(s) π©
- Improving Code Health: 1 findings(s) β
- Affected Hotspots: 2 files(s) π₯
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
Details
π© Declining Code Health (highest to lowest):
- Complex Method RecipeForm.tsx: RecipeForm
- Complex Method recipeRouter.ts: recipeRouter π₯
- Large Method recipeView.tsx: RecipeView π₯
- Complex Conditional page.tsx: RecipeEditPage
β Improving Code Health:
- Large Method seed.ts: main
Annotations
Check warning on line 1 in src/app/(dashboard)/dashboard/recipe/[recipeId]/edit/page.tsx
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
β New issue: Complex Conditional
RecipeEditPage has 1 complex conditionals with 2 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.
Check warning on line 306 in src/components/forms/recipe/RecipeForm.tsx
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
β New issue: Complex Method
RecipeForm has a cyclomatic complexity of 11, 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 218 in src/components/recipeView.tsx
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
β Getting worse: Large Method
RecipeView increases from 179 to 191 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.
Check warning on line 330 in src/trpc/recipe/recipeRouter.ts
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
β Getting worse: Complex Method
recipeRouter already has high cyclomatic complexity, and now it increases in Lines of Code from 243 to 270. 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 notice on line 35 in prisma/seed.ts
codescene-delta-analysis / CodeScene Cloud Delta Analysis (master)
β Getting better: Large Method
main decreases from 78 to 76 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
Loading