diff --git a/eng/Common.globalconfig b/eng/Common.globalconfig index ba417e063f2..561275f6135 100644 --- a/eng/Common.globalconfig +++ b/eng/Common.globalconfig @@ -956,7 +956,7 @@ dotnet_diagnostic.SA1405.severity = suggestion dotnet_diagnostic.SA1407.severity = suggestion # Conditional expressions should declare precedence -dotnet_diagnostic.SA1408.severity = suggestion +dotnet_diagnostic.SA1408.severity = warning dotnet_diagnostic.SA1410.severity = none diff --git a/src/Build/BackEnd/BuildManager/BuildManager.cs b/src/Build/BackEnd/BuildManager/BuildManager.cs index e2b4a71dc6f..8a14da34757 100644 --- a/src/Build/BackEnd/BuildManager/BuildManager.cs +++ b/src/Build/BackEnd/BuildManager/BuildManager.cs @@ -909,7 +909,7 @@ public void EndBuild() { // Override the build success if the user specified /warnaserror and any errors were logged outside of a build submission. if (exceptionsThrownInEndBuild || - _overallBuildSuccess && loggingService.HasBuildSubmissionLoggedErrors(BuildEventContext.InvalidSubmissionId)) + (_overallBuildSuccess && loggingService.HasBuildSubmissionLoggedErrors(BuildEventContext.InvalidSubmissionId))) { _overallBuildSuccess = false; } diff --git a/src/Build/BackEnd/Components/ProjectCache/ProjectCacheService.cs b/src/Build/BackEnd/Components/ProjectCache/ProjectCacheService.cs index 2a11a10f59b..3db0eeb4a3a 100644 --- a/src/Build/BackEnd/Components/ProjectCache/ProjectCacheService.cs +++ b/src/Build/BackEnd/Components/ProjectCache/ProjectCacheService.cs @@ -282,7 +282,7 @@ public void PostCacheRequest(CacheRequest cacheRequest) ErrorUtilities.VerifyThrowInternalError( LateInitializationForVSWorkaroundCompleted is null || - _projectCacheDescriptor.VsWorkaround && LateInitializationForVSWorkaroundCompleted.Task.IsCompleted, + (_projectCacheDescriptor.VsWorkaround && LateInitializationForVSWorkaroundCompleted.Task.IsCompleted), "Completion source should be null when this is not the VS workaround"); BuildRequestData buildRequest = new BuildRequestData( @@ -314,7 +314,7 @@ static bool IsDesignTimeBuild(ProjectInstance project) var buildingProject = project.GlobalPropertiesDictionary[DesignTimeProperties.BuildingProject]?.EvaluatedValue; return MSBuildStringIsTrue(designTimeBuild) || - buildingProject != null && !MSBuildStringIsTrue(buildingProject); + (buildingProject != null && !MSBuildStringIsTrue(buildingProject)); } void EvaluateProjectIfNecessary(CacheRequest request)