Skip to content

Commit

Permalink
Ignore calls to base class constructor in code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
fflaten committed Aug 2, 2024
1 parent 0d3dd66 commit e62d09f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/functions/Coverage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,12 @@ function IsIgnoredCommand {
return $true
}

if ($Command -is [System.Management.Automation.Language.CommandExpressionAst] -and
$Command.Expression[0] -is [System.Management.Automation.Language.BaseCtorInvokeMemberExpressionAst]) {
# Calls to inherited "base(...)" constructor does not trigger breakpoint or tracer hit, ignore.
return $true
}

return $false
}

Expand Down

0 comments on commit e62d09f

Please sign in to comment.