Repository navigation
Conversation
|
Azure Pipelines: Successfully started running 2 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
π‘ Changes recommended
The analyzer-config documentation overstates precedence and resolution guarantees by omitting same-section restrictions, cross-file global_level rules, and the requirement to place directives before section headers.
1 open issue
What changed in this PR
This PR adds config-relative build properties to Roslynβs global analyzer configs, supporting location-independent configuration for build caching as described in #86593.
Changes:
- Resolve
config_relative_build_property.*directives intobuild_property.*options before merging global configs. - Preserve empty values and trailing separators, with explicit same-section values taking precedence.
- Add compiler, command-line generator, and workspace tests, plus usage documentation.
| File | Description |
|---|---|
src/βWorkspaces/βCoreTest/βSolutionTests/βSolutionTests.cs |
Tests resolution relative to the config location across project and config moves. |
src/βCompilers/βCSharp/βTest/βCommandLine/βCommandLineTests.cs |
Verifies resolved properties reach source generators. |
src/βCompilers/βCore/βPortable/βCommandLine/βAnalyzerConfigSet.cs |
Resolves relative property directives before global merging. |
src/βCompilers/βCore/βPortable/βCommandLine/βAnalyzerConfig.cs |
Defines the config-relative property prefix. |
src/βCompilers/βCore/βCodeAnalysisTest/βAnalyzers/βAnalyzerConfigTests.cs |
Tests resolution, precedence, conflicts, and path edge cases. |
docs/βcompilers/βanalyzer-config.md |
Documents directive syntax and behavior. |
Review effort: Balanced
Comment on lines
+47
to
+48
| Explicit `build_property` values override config-relative values. | ||
| The `config_relative_build_property` directives themselves are not exposed to analyzers. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Part of #86593.
Microsoft Reviewers: Open in CodeFlow