From c073221943a91cbdd4e464eb2648f3d4c74ea4f8 Mon Sep 17 00:00:00 2001 From: Timothy Mothra Date: Wed, 5 May 2021 11:00:34 -0700 Subject: [PATCH] update analyzers (#2198) * update analyzers * remove default case, tests should pass * fxcop * cleanup * testing fix --- .props/Product.props | 19 ++++++++++++++++--- .rulesets/ApplicationInsightsSDKRules.ruleset | 2 ++ .../Tracing/HeartbeatProvider.cs | 6 +----- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.props/Product.props b/.props/Product.props index 9f5902e87f..da6f6ec38f 100644 --- a/.props/Product.props +++ b/.props/Product.props @@ -13,17 +13,20 @@ + + All + All - + All - + all runtime; build; native; contentfiles; analyzers - + All @@ -40,6 +43,16 @@ + + + latest + AllEnabledByDefault + + + + + + $(RelativeOutputPathBase) $(BinRoot)\$(Configuration)\$(CorePath) diff --git a/.rulesets/ApplicationInsightsSDKRules.ruleset b/.rulesets/ApplicationInsightsSDKRules.ruleset index c9845014d5..07fd28a30d 100644 --- a/.rulesets/ApplicationInsightsSDKRules.ruleset +++ b/.rulesets/ApplicationInsightsSDKRules.ruleset @@ -105,6 +105,8 @@ + + diff --git a/BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/HeartbeatProvider.cs b/BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/HeartbeatProvider.cs index d963d2e451..2dfef202d3 100644 --- a/BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/HeartbeatProvider.cs +++ b/BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/Tracing/HeartbeatProvider.cs @@ -77,11 +77,7 @@ public TimeSpan HeartbeatInterval get => this.interval; set { - if (value == null) - { - this.interval = DefaultHeartbeatInterval; - } - else if (value <= MinimumHeartbeatInterval) + if (value <= MinimumHeartbeatInterval) { this.interval = MinimumHeartbeatInterval; }