Skip to content
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

Fix SwiftFormat SwiftPM plugin not taking into account the local dependencies of targets #1572

Merged
merged 4 commits into from
Nov 11, 2023

Conversation

MahdiBM
Copy link
Contributor

@MahdiBM MahdiBM commented Nov 7, 2023

Xcode in plugins will always pass --target and it will only pass the products.
When SwiftFormat's package plugin extracts those, it'll only perform the formatting for those targets which are the products,
and it'll ignore the local dependencies of those product targets.
This makes it so the plugin doesn't format any other targets other than products, which is less than optimal.

This PR will change it so SwiftFormat plugin will also run on local dependencies of the targets passed to the plugin.

This will also match the the code i've written for swift-openapi-generator package plugin.

@MahdiBM
Copy link
Contributor Author

MahdiBM commented Nov 7, 2023

Forgot to mention, but about deleting the Xcode plugin file: I don't think doing this is possible with the Xcode Plugin version (the same reason why the openapi plugin doesn't have that)

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Merging #1572 (a538465) into main (8dc0e85) will decrease coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1572      +/-   ##
==========================================
- Coverage   95.19%   95.17%   -0.03%     
==========================================
  Files          17       17              
  Lines       20605    20605              
==========================================
- Hits        19615    19610       -5     
- Misses        990      995       +5     

see 1 file with indirect coverage changes

@nicklockwood nicklockwood merged commit 0a2a386 into nicklockwood:main Nov 11, 2023
6 of 7 checks passed
@nicklockwood
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants