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

[Feature] --ignore-package Option #123

Merged
merged 9 commits into from
Oct 6, 2024

Conversation

pixlwave
Copy link
Contributor

@pixlwave pixlwave commented Sep 26, 2024

This PR adds a --ignore-package option to the CLI for filtering out specific packages by their identity; to expose this functionality to the SPM plugin there is a new optional "ignorePackages" field in the config.


Original message:

Hi, I'm not sure what you look for in a contribution, so opening this as a starting point for discussion.

We're using swift-package-list in our project (really love it, thanks for making this project) and would like a way to filter out our own packages from the generated Acknowledgements. This PR adds the ability to run a command like so

swift-package-list ElementX.xcodeproj --requires-license --ignore-base-url https://github.com/element-hq --output-type settings-bundle --output-path ElementX/SupportingFiles

This would ignore any packages who's repository URLs are https://github.com/element-hq/…

Let me know if you would prefer to do this another way, tweak the naming, or if there is more implementation required for this PR to be mergeable.

@pixlwave pixlwave changed the title Add ignoreBaseURL option to the CLI. Add ignorePackage option to the CLI. Sep 26, 2024
@pixlwave
Copy link
Contributor Author

Ok, this turned out to not be flexible enough for our needs so I've updated it to a single ignorePackage option instead. i.e.

swift-package-list ElementX.xcodeproj --requires-license --ignore-package element-design --ignore-package element-design-tokens --output-type settings-bundle --output-path ElementX/SupportingFiles

@FelixHerrmann
Copy link
Owner

Hey @pixlwave, thanks for your contribution. It def. makes sense to have such functionality, in fact I've used the --required-license to exclude internal packages but this has its limitations. Will take a closer look when I have a free minute, is it a big blocker for you and your team?

@pixlwave
Copy link
Contributor Author

Ok nice thanks. No don’t worry, it’s definitely not a big blocker for us - and if we do suddenly need it we can always run from the fork for a while :)

Copy link
Owner

@FelixHerrmann FelixHerrmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I did some modifications and added this functionality to the SPM plugin but we can get this feature in now!

@FelixHerrmann FelixHerrmann changed the title Add ignorePackage option to the CLI. [Feature] --ignore-package option Oct 6, 2024
@FelixHerrmann FelixHerrmann changed the title [Feature] --ignore-package option [Feature] --ignore-package Option Oct 6, 2024
@FelixHerrmann FelixHerrmann merged commit 58d667b into FelixHerrmann:master Oct 6, 2024
13 of 14 checks passed
@pixlwave pixlwave deleted the ignore-base-url branch October 7, 2024 20:02
@pixlwave
Copy link
Contributor Author

pixlwave commented Oct 7, 2024

Very nice! Thanks Felix.

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