CycloneDX / cyclonedx-cocoapods

Creates CycloneDX Software Bill-of-Materials (SBOM) from Objective-C and Swift projects that use CocoaPods.
Apache License 2.0
21 stars 12 forks source link

Fix parsing podfile with inhibit_warnings_with_condition method #55

Closed DwayneCoussement closed 1 year ago

macblazer commented 1 year ago

@DwayneCoussement As far as I can tell, the function inhibit_warnings_with_condition is only available when using this CocoaPods plugin: https://github.com/leavez/cocoapods-developing-folder

The cyclonedx-cocoapods implementation does not currently load plugins (defined in a Podfile with the plugin "foo" syntax). However your solution of specifying an empty implementation of init_warnings_with_condition is very specific to that single plugin.

I would rather see a general solution that will work for all CocoaPods plugin definitions, probably by actually triggering the load of the plugin. Do you have time to work up a more general solution?

DwayneCoussement commented 1 year ago

Hi @macblazer, you've analyzed that totally correct! That makes totally sense, I've refactored this to load the plugins as you mentioned. I hope this makes more sense :) Thanks for the review btw, I appreciate it.