Skip to content

Commit d058d7e

Browse files
authored
SA1408 Conditional expressions should declare precedence (#7269)
1 parent 4b82f8d commit d058d7e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

eng/Common.globalconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ dotnet_diagnostic.SA1405.severity = suggestion
956956
dotnet_diagnostic.SA1407.severity = suggestion
957957

958958
# Conditional expressions should declare precedence
959-
dotnet_diagnostic.SA1408.severity = suggestion
959+
dotnet_diagnostic.SA1408.severity = warning
960960

961961
dotnet_diagnostic.SA1410.severity = none
962962

src/Build/BackEnd/BuildManager/BuildManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ public void EndBuild()
909909
{
910910
// Override the build success if the user specified /warnaserror and any errors were logged outside of a build submission.
911911
if (exceptionsThrownInEndBuild ||
912-
_overallBuildSuccess && loggingService.HasBuildSubmissionLoggedErrors(BuildEventContext.InvalidSubmissionId))
912+
(_overallBuildSuccess && loggingService.HasBuildSubmissionLoggedErrors(BuildEventContext.InvalidSubmissionId)))
913913
{
914914
_overallBuildSuccess = false;
915915
}

src/Build/BackEnd/Components/ProjectCache/ProjectCacheService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public void PostCacheRequest(CacheRequest cacheRequest)
282282

283283
ErrorUtilities.VerifyThrowInternalError(
284284
LateInitializationForVSWorkaroundCompleted is null ||
285-
_projectCacheDescriptor.VsWorkaround && LateInitializationForVSWorkaroundCompleted.Task.IsCompleted,
285+
(_projectCacheDescriptor.VsWorkaround && LateInitializationForVSWorkaroundCompleted.Task.IsCompleted),
286286
"Completion source should be null when this is not the VS workaround");
287287

288288
BuildRequestData buildRequest = new BuildRequestData(
@@ -314,7 +314,7 @@ static bool IsDesignTimeBuild(ProjectInstance project)
314314
var buildingProject = project.GlobalPropertiesDictionary[DesignTimeProperties.BuildingProject]?.EvaluatedValue;
315315

316316
return MSBuildStringIsTrue(designTimeBuild) ||
317-
buildingProject != null && !MSBuildStringIsTrue(buildingProject);
317+
(buildingProject != null && !MSBuildStringIsTrue(buildingProject));
318318
}
319319

320320
void EvaluateProjectIfNecessary(CacheRequest request)

0 commit comments

Comments
 (0)