Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive unit tests for the SPMGraphConfig functionality, validates the default lint rules against a fixture package, and fixes issues with how default lint rules use injected module definitions.
Key Changes:
- Adds unit tests for all three default lint rules (liveModuleLiveDependency, baseOrInterfaceModuleLiveDependency, unusedDependencies)
- Creates a fixture package structure to validate lint rules against real package scenarios
- Fixes default lint rules to properly use injected
isLiveModulepredicates instead of hardcoded property access
Reviewed Changes
Copilot reviewed 20 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| spmgraph.xctestplan | Registers the new test target in the test plan |
| Tests/SPMGraphDescriptionInterfaceTests/SPMGraphConfigTests.swift | Comprehensive unit tests for config and all lint rules |
| Tests/SPMGraphDescriptionInterfaceTests/Fixtures/Package+Fixture.swift | Helper function to load the fixture package for testing |
| Tests/SPMGraphDescriptionInterfaceTests/Fixtures/PackageFixture/Package.swift | Fixture package definition with various module dependency scenarios |
| Tests/SPMGraphDescriptionInterfaceTests/Fixtures/PackageFixture/Sources/* | Fixture module implementations demonstrating various dependency patterns |
| Tests/SPMGraphDescriptionInterfaceTests/Fixtures/PackageFixture/Tests/BaseModuleTests/* | Fixture test target |
| Sources/SPMGraphDescriptionInterface/SPMGraphConfigInterface.swift | Fixes lint rules to use injected predicates and makes Error enum Equatable |
| Sources/SPMGraphLint/SPMGraphLint.swift | Makes SPMGraphLintInput Equatable and exposes memberwise initializer |
| Package.swift | Adds new test target with fixture resources |
| .swiftpm/xcode/xcshareddata/xcschemes/spmgraph-Package.xcscheme | Updates Xcode scheme with test plan and test targets |
| Tests/Fixtures/Package/* | Removes old fixture package (replaced by new structure) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Tests/SPMGraphDescriptionInterfaceTests/SPMGraphConfigTests.swift
Outdated
Show resolved
Hide resolved
Tests/SPMGraphDescriptionInterfaceTests/Fixtures/Package+Fixture.swift
Outdated
Show resolved
Hide resolved
Improve `config-build-directory`
roveabruno
reviewed
Oct 27, 2025
roveabruno
reviewed
Oct 27, 2025
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.
isLiveModuleAlso