lazy-loading-implementation: runs Change Detection Optimization's analyzers and repeats their findings
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 50/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- angular, typescript
- 领域
- frontend, performance
调研方向
Start in src/utils/angular/angular-bundle/angular-bundle-validation-patterns.ts, at validateSourceCodeOptimization (lines 189-215), which calls the three ChangeDetectionOptimizationLaw analyzers. The 'No Angular components found' message comes from src/checkers/performance-laws/change-detection-optimization.ts line 70. Done means a project with no component files shows that message once or not at all under Lazy Loading, and Lazy Loading no longer reports change-detection findings. Check the design choice in the issue's suggested direction with a maintainer before changing it.
由索引模型根据 Issue 内容生成。
描述
Version: 8.0.1 (tag v8.0.1)
Law: lazy-loading-implementation (Lazy Loading Implementation)
What happens
Lazy Loading's bundle step, AngularBundleValidationPatterns.validateSourceCodeOptimization (src/utils/angular/angular-bundle/angular-bundle-validation-patterns.ts:189-215), calls three analyzers of another law, ChangeDetectionOptimizationLaw (analyzeComponents, analyzeTrackByUsage, analyzeObservableUsage), and appends their violations to its own. When a project has no component files, more than one of them returns No Angular components found (src/checkers/performance-laws/change-detection-optimization.ts:70), so the line appears twice:
1. Lazy Loading Implementation [2 violations] (Score: 80/100)
• No Angular components found
• No Angular components found
Reproduction
An Angular project with angular.json and routes but no *.component.ts (for example components in files without the suffix, or a library-only workspace), with Lazy Loading Implementation enabled.
What I ruled out
The duplicate is not in the renderer: the law's result carries two identical violation strings.
Why it matters
- The same sentence twice reads like two findings and costs 20 points.
- A lazy-loading law reports change-detection findings (component analysis,
trackBy, observable usage) that belong to Change Detection Optimization, which reports them itself. A project then sees the same finding under two laws, and fixing it moves two scores.
Suggested direction
- Lazy Loading judges lazy loading: routes with
loadChildren/loadComponent, bundle budgets. Drop the call into Change Detection Optimization's analyzers. - If something must be shared, share the reader, not another law's violation strings, and deduplicate.
- "No Angular components found" is a reason the law judged nothing (#427), not a violation: report it as not read / judged nothing.
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 0
- 平均合并
- 2 小时 36 分钟
- 30 天内合并 PR
- 168
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Rule-Of-Code/RoC 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
Rule-Of-Code/RoC#548 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
Rule-Of-Code/RoC#547 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
Rule-Of-Code/RoC#506 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
Rule-Of-Code/RoC#501 ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 62/100
Rule-Of-Code/RoC#563 ·
维护者通常 1 天内回复
相似的 Issue
-
bug done
难度 2/5 1-3 小时 新手友好度 65/100
neavo/LinguaGacha#1124 ·
维护者通常 1 天内回复
-
[fullsend] E2E: backstage-microsoft-auth — catalogQuery missing error handler for network errors可能已有人在做 @fullsend-ai-coder 今天认领。 未关闭e2e-failure ready-to-code
难度 2/5 1 小时以内 新手友好度 78/100
redhat-developer/rhdh-plugin-export-overlays#4821 · 1 条评论 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 62/100
brylie/mission-island#225 ·
维护者通常 1 天内回复
-
status/need-triage
难度 2/5 1-3 小时 新手友好度 72/100
google-gemini/gemini-cli#30412 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复