microsoft / component-detection

Scans your project to determine what components you use
MIT License
396 stars 81 forks source link

Minimatch for directory exclusion #1091

Closed chriskarlsson closed 1 month ago

chriskarlsson commented 2 months ago

To me the description on how to define DirectoryExclusionList was very confusing since the comparison was globing and not minimatch and that there was no mention of ';' being used to define multiple patterns. This PR aims to solve both of those issues.

The minimatch implementation is a port of https://github.com/isaacs/minimatch to C#.

chriskarlsson commented 2 months ago

@microsoft-github-policy-service agree company="Appgate"

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 88.03828% with 50 lines in your changes are missing coverage. Please review.

Project coverage is 76.1%. Comparing base (5894c27) to head (e0161c9). Report is 10 commits behind head on main.

Files Patch % Lines
...osoft.ComponentDetection.Orchestrator/Minimatch.cs 87.9% 29 Missing and 21 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1091 +/- ## ======================================= + Coverage 75.7% 76.1% +0.4% ======================================= Files 245 246 +1 Lines 10972 11378 +406 Branches 1101 1174 +73 ======================================= + Hits 8307 8663 +356 - Misses 2343 2372 +29 - Partials 322 343 +21 ```

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

chriskarlsson commented 1 month ago

Sorry. I've been quite busy the last weeks. I hope I could get back to it this week.

chriskarlsson commented 1 month ago

Do you have a timeline when this is needed for your tooling? Generally speaking we try and give a few weeks heads before pushing major versions.

Missed your question before. I've worked around this in our tooling. So for us this isn't necessary. Just thought it would be a nice upgrade to the repo.

chriskarlsson commented 1 month ago

@cobya - Updated with respect to your comments last week. Please have a look to see if it looks good to you.

cobya commented 1 month ago

Thanks again for the contribution here 🫶 I've merged the changes into the cobya/v5 branch will be used as the baseline for the upcoming breaking changes tracked in #1135 and the next major release!