microsoft / component-detection

Scans your project to determine what components you use
MIT License
398 stars 83 forks source link

feat(rust): allow specifying features to `cargo metadata` #1009

Open melotic opened 4 months ago

melotic commented 4 months ago

Closes #1001

This uses a new environment variable to configure the Rust CLI detector, CD_RUST_CLI_FEATURES. Open to any other ideas on how to pass this into the detector.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (c2cfd4d) 75.3% compared to head (99e9102) 75.3%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1009 +/- ## ===================================== Coverage 75.3% 75.3% ===================================== Files 236 236 Lines 10353 10357 +4 Branches 1025 1026 +1 ===================================== + Hits 7800 7804 +4 Misses 2269 2269 Partials 284 284 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

cobya commented 4 months ago

I think it's time to start investing in a file-based configuration approach where we have a top-level service read a file from something like .detection/config.json where we keep these environment variables, but that would probably be outside the scope of this 🤨