-
Notifications
You must be signed in to change notification settings - Fork 0
feat(): report all violations #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
packages/angular-mcp-server/src/lib/tools/ds/report-violations/report-violations-all.tool.ts
Outdated
Show resolved
Hide resolved
packages/angular-mcp-server/src/lib/tools/ds/report-violations/report-violations-all.tool.ts
Outdated
Show resolved
Hide resolved
ad44faa
to
a58480b
Compare
|
||
1. Run a scan using the report-violations function with the following parameters: | ||
- component: {{COMPONENT_NAME}} | ||
1. Run a scan using the report-all-violations function with the following parameters: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Primary method still remains report-violations, this should be mentioned as alternative
2. Deduplicate violations by file and line: | ||
- Process scanResult to remove duplicate entries that have the same file path and line number | ||
- When combining duplicates, merge the component/class information (e.g., "btn, btn-primary violations on line 10") | ||
- Keep the deduplicated count for accurate violation totals | ||
- Store the deduplicated result and use it for all subsequent processing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dedup is a bug, that should be fixed in visitor, we shouldn't mention that here.
2. Run a file-level scan: | ||
- Use the report-violations function with these parameters: | ||
- component: {{COMPONENT_NAME}} | ||
- Use the report-all-violations function with these parameters: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, just violations is primary
3. Deduplicate violations by file and line: | ||
- Process fileScan to remove duplicate entries that have the same file path and line number | ||
- When combining duplicates, merge the component/class information | ||
- Keep the deduplicated count for accurate violation totals | ||
- Store the deduplicated result and use it for all subsequent processing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we have this again?
|
||
1. Run a scan using the report-violations function with the following parameters: | ||
- component: {{COMPONENT_NAME}} | ||
1. Run a scan using the report-all-violations function with the following parameters: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please leave current rule as is and create a separate one.
<component_docs>{{COMPONENT_DOCS}}</component_docs>: The official documentation for the target design-system component | ||
<component_code>{{COMPONENT_CODE}}</component_code>: The source files of the target design-system component | ||
<usage_graph>{{USAGE_GRAPH}}</usage_graph>: A graph showing the usage of the legacy component in the specified folder | ||
<component_docs>{{COMPONENT_DOCS}}</component_docs>: The official documentation for the target design-system components |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, please keep original rule and create new one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cosmetic changes related to the order in naming conventions to be done, but nothing blocking that cannot go in a separate PR.
.cursor/flows/README.md
Outdated
- `02-plan-refactoring.mdc` - Create detailed migration strategy for specific cases | ||
|
||
**Option B: Comprehensive Approach** (recommended for large-scale migrations) | ||
- `01a-find-all-violations.mdc` - Scan entire codebase, group by folders, select subfolder for detailed analysis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Option B and file name 01a. Not that critical, but inconsistent.
- `02a-plan-refactoring-for-all-violations.mdc` - Create comprehensive migration plan for all violations in scope | ||
|
||
**Continuation Steps** (used with both approaches): | ||
- `03-non-viable-cases.mdc` - Handle non-migratable components by marking them for exclusion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed that we have two 03 step files.
Summary
Introduce
report-all-violations
, an MCP tool that scans a directory for all Design System (DS) deprecated CSS violations across every configured DS component and outputs a consolidated report.What it does
report-violations
, respectinggroupBy
.Why
Changes
packages/angular-mcp-server/src/lib/tools/ds/report-violations/report-violations-all.tool.ts
.loadAndValidateDsComponentsFile
.analyzeProjectCoverage
.formatViolations
(keeps parity withreport-violations
).Usage
report-all-violations
directory
(string): directory to scangroupBy
('file' | 'folder'; default: 'file')Output format
report-violations
: