Add IgnorePatterns for flexible prebuilt baselines #6155
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change adds support for
IgnorePatternsto the prebuilt usage baseline file. This means a repo on arcade-powered source-build can have this content ateng/SourceBuildPrebuiltBaseline.xmlto ignore all prebuilt usage when onboarding:Then, usage can be gradually decreased and the
UsagePatterns can be tweaked to be more specific to the repo. The eventual goal is to allow necessary prebuilts (e.g. cycles in the dependency graph), but make unexpected new prebuilts show up as PR validation failures. This is for dotnet/source-build#1715It supports regex via
IdentityRegexfor even more flexibility if needed.The ignored usage still shows up in the more detailed reports for analysis, but they don't cause an error. (Or cause a warning--because warnings are treated as errors in Arcade.)
I'm also planning to port this to dotnet/source-build for more sustainability there: dotnet/source-build#1726.
This PR also adds a simple test project for a few scenarios I wanted to verify. (This is the test project I tried to add in #6121, but I'd backed it out when I didn't want to spend the time to figure out why it was failing in CI.)