Skip to content

Commit

Permalink
Fix ScriptAnalyzer finding (rule : PSPossibleIncorrectComparisonWithN…
Browse files Browse the repository at this point in the history
…ull)
  • Loading branch information
MathieuBuisson committed Jul 5, 2017
1 parent 698cecc commit 1f2b91d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PSCodeHealth/Public/Test-PSCodeHealthCompliance.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Function Test-PSCodeHealthCompliance {
If ( $ComplianceRule.SettingsGroup -eq 'PerFunctionMetrics' ) {

$MetricsFromReport = $FunctionHealthRecords.$($ComplianceRule.MetricName)
If ( $MetricsFromReport -ne $Null ) {
If ( $Null -ne $MetricsFromReport ) {
If ( $ComplianceRule.HigherIsBetter ) {
# We always retain the worst value of all the analyzed functions
$RetainedValue = ($MetricsFromReport | Measure-Object -Minimum).Minimum
Expand Down

0 comments on commit 1f2b91d

Please sign in to comment.