Starting to yeet the template files out of the vsce. #1442
CodeScene PR Check
✅ Code Health Quality Gates: OK
- Declining Code Health: 2 findings(s) 🚩
- Improving Code Health: 5 findings(s) ✅
- Affected Hotspots: 0 files(s) 🔥
Recommended Review Level: Lightweight sanity check
View detailed results in CodeScene
Details
🚩 Declining Code Health (highest to lowest):
- Excess Number of Function Arguments templates.js: copyTemplateDirectory
- Bumpy Road Ahead templates.js: createGitRepository
✅ Improving Code Health:
- Complex Method templates.js: exports.createProjectFromTemplate
- Complex Method main.js: 'message'
- Bumpy Road Ahead main.js: 'message'
- Deep, Nested Complexity main.js: 'message'
- Large Method templates.js: createSkeleton
Annotations
Check notice on line 454 in tools/vscode-extension/templates.js
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Complex Method
exports.createProjectFromTemplate decreases in cyclomatic complexity from 14 to 12, threshold = 9. 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 303 in tools/vscode-extension/templates.js
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
createGitRepository has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
Check warning on line 325 in tools/vscode-extension/templates.js
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Excess Number of Function Arguments
copyTemplateDirectory has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 204 in tools/vscode-extension/templates.js
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Large Method
createSkeleton is no longer above the threshold for lines of code
Check notice on line 158 in tools/vscode-extension/media/main.js
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
'message' is no longer above the threshold for cyclomatic complexity
Check notice on line 158 in tools/vscode-extension/media/main.js
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
'message' is no longer above the threshold for logical blocks with deeply nested code
Check notice on line 158 in tools/vscode-extension/media/main.js
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Deep, Nested Complexity
'message' is no longer above the threshold for nested complexity depth