-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#91 intended to enable warnings as errors in CI. However, `$(ContinuousIntegrationBuild)` is set by `DotNet.ReproducibleBuilds`, and that package's .props file is imported _after_ our own Directory.Build.props. As a result, the properties were evaluated before they were set. This change moves them into the .targets file as "computed properties" in order for them to pick up the configuration from .props files. This aligns with the [documented guidance](https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2022#choose-between-adding-properties-to-a-props-or-targets-file) "Set dependent properties in .targets files, because they pick up customizations from individual projects.". I've also filed dotnet/reproducible-builds#45 to see if we can make the reproducible-builds package more intuitive. Lastly, this cleans up existing warnings: - Fixes whitespace issues - Suppresses StyleCop warnings about documenting public members in tests, which already had the built-in rules suppressed - Reorders static members to be above instance members - Adds a single suppression for a long method to keep the change small
- Loading branch information
1 parent
914926a
commit a883a67
Showing
7 changed files
with
57 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
<Project> | ||
<PropertyGroup Label="Computed properties"> | ||
<PedanticMode Condition=" '$(PedanticMode)' == '' ">$([MSBuild]::ValueOrDefault('$(ContinuousIntegrationBuild)', 'false'))</PedanticMode> | ||
<TreatWarningsAsErrors>$(PedanticMode)</TreatWarningsAsErrors> | ||
<MSBuildTreatWarningsAsErrors>$(PedanticMode)</MSBuildTreatWarningsAsErrors> | ||
</PropertyGroup> | ||
</Project> |
This file contains 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
This file contains 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
This file contains 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
1 change: 1 addition & 0 deletions
1
tests/Moq.Analyzers.Test/ConstructorArgumentsShouldMatchAnalyzerTests.DefaultParam.cs
This file contains 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
1 change: 1 addition & 0 deletions
1
tests/Moq.Analyzers.Test/ConstructorArgumentsShouldMatchAnalyzerTests.Delegates.cs
This file contains 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