test: add fixture coverage for rule families#122
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive fixture coverage for XML rule family validation and expands test coverage across all rule families. The changes introduce XML test fixtures demonstrating various XML parsing errors, document fixture conventions, and add both core and CLI integration tests to verify that fixtures correctly trigger their expected rule violations.
Changes:
- Added XML fixtures covering unclosed tags (XML-001), mismatched tags (XML-002), and unmatched closing tags (XML-003), plus a valid XML sample
- Created fixture documentation explaining conventions and providing a reference table for all rule families
- Expanded core fixture validation tests to assert that each family's fixtures trigger the correct rule IDs
- Added CLI integration tests that validate fixture behavior through the command-line interface
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/fixtures/xml/xml-valid.md | Valid XML fixture that should not trigger any XML-family diagnostics |
| tests/fixtures/xml/xml-003-unmatched.md | Fixture demonstrating unmatched closing tag error (XML-003) |
| tests/fixtures/xml/xml-002-mismatch.md | Fixture demonstrating mismatched opening/closing tags (XML-002) |
| tests/fixtures/xml/xml-001-unclosed.md | Fixture demonstrating unclosed tag error (XML-001) |
| tests/fixtures/README.md | Documents fixture conventions and provides reference table for all rule families |
| crates/agnix-core/src/lib.rs | Adds test assertions for XML, AGM, XP, REF fixtures and creates positive test cases verifying valid fixtures produce no diagnostics |
| crates/agnix-cli/tests/fixture_family_cli.rs | New CLI integration test file verifying that fixtures trigger expected rules through the command-line interface |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary of ChangesHello @avifenesh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the testing infrastructure for the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request significantly improves test coverage by adding fixtures and integration tests for various rule families. The changes are well-structured and the new tests effectively cover the intended scenarios. I have a couple of suggestions to refactor some of the new test code to reduce duplication and improve maintainability.
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| assert!( | ||
| diagnostics | ||
| .iter() | ||
| .any(|d| { d.rule == rule && d.file.to_string_lossy().contains(file_part) }), |
There was a problem hiding this comment.
The closure has unnecessary braces around the boolean expression. This is inconsistent with the style used in similar assertions in this test function (lines 1408-1409 and 1416-1417). The braces should be removed for consistency.
| .any(|d| { d.rule == rule && d.file.to_string_lossy().contains(file_part) }), | |
| .any(|d| d.rule == rule && d.file.to_string_lossy().contains(file_part)), |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
* fix: resolve security alerts (serialize-javascript, XP-SK-001) - Remove non-standard `version` field from SKILL.md frontmatter (fixes code scanning alert #1062, XP-SK-001) - Override serialize-javascript to ^7.0.5 in website and vscode extension to fix CPU exhaustion DoS vulnerability (fixes Dependabot alerts #122 and #123) * fix: address review feedback - add engines.node, changelog entry - Add engines.node >= 20.0.0 to website and vscode extension (serialize-javascript@7 requires Node 20+) - Add CHANGELOG.md entry for security fixes * fix: merge engines.node into existing engines block Avoid overwriting engines.vscode by merging the Node constraint into the existing engines object instead of adding a duplicate key. * fix: merge duplicate Fixed headings in changelog
Summary
Test Plan
Related Issues
Closes #45