feat: Add zip-contains rule for asserting zip archive entry existence#47
Draft
Copilot wants to merge 3 commits into
Draft
feat: Add zip-contains rule for asserting zip archive entry existence#47Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
3 tasks
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
…ME table alignment Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add zip contents checking rules using FileAssert
feat: Add zip-contains rule for asserting zip archive entry existence
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Adds a
zip-containsassertion rule enabling FileAssert to validate that zip archives (including.nupkg,.jar, etc.) contain expected entries, with optional min/max count constraints and glob pattern matching.New rule:
zip-containsEntry paths are normalized to forward slashes before matching; glob patterns are resolved via
Microsoft.Extensions.FileSystemGlobbing(same mechanism asFileAssertFile). No new NuGet dependencies — usesSystem.IO.Compressionfrom the BCL.Changes
Modeling/FileAssertZipAssert.cs— new rule implementation; opens zip viaZipFile.OpenRead, collects all entry names, appliesMatcherper pattern, enforces min/maxConfiguration/FileAssertData.cs— newFileAssertZipEntryDataandFileAssertZipDataDTOsModeling/FileAssertRule.cs— registers"zip-contains"typeREADME.md— documents new rule with YAML examplesdocs/;introduction.mdand.reviewmark.yamlupdated to include the new unitType of Change
Related Issues
Closes #
Pre-Submission Checklist
Before submitting this pull request, ensure you have completed the following:
Build and Test
pwsh ./build.ps1Code Quality
Quality Checks
pwsh ./lint.ps1Testing
Documentation
Additional Notes
zip-containsintentionally checks only entry existence. Recursive content inspection of zip entries (text/HTML/JSON/etc.) is explicitly deferred — it would require abstracting the file-system interface used by existing rules.