Closed JohnDoeKyrgyz closed 7 months ago
Thanks for reporting 🙏 . I can reproduce it.
I just checked it again. PR https://github.com/coverlet-coverage/coverlet/pull/1542 will close this issue.
<?xml version="1.0" encoding="utf-8"?>
<coverage line-rate="1" branch-rate="0" version="1.9" timestamp="1699169476" lines-covered="1" lines-valid="1" branches-covered="0" branches-valid="4">
<sources>
<source>D:\</source>
</sources>
<packages>
<package name="Issue1547" line-rate="1" branch-rate="0" complexity="5">
<classes>
<class name="Issue1547.Say" filename="Repos\Repros\Issue1547\Issue1547\Library.fs" line-rate="1" branch-rate="1" complexity="1">
<methods>
<method name="formatHello" signature="(System.String)" line-rate="1" branch-rate="1" complexity="1">
<lines>
<line number="20" hits="1" branch="False" />
</lines>
</method>
</methods>
<lines>
<line number="20" hits="1" branch="False" />
</lines>
</class>
<class name="Issue1547.Say/Pipe #1 input at line 11@12" filename="Repos\Repros\Issue1547\Issue1547\Library.fs" line-rate="1" branch-rate="0" complexity="4">
<methods />
<lines />
</class>
</classes>
</package>
</packages>
</coverage>
Describe the bug The ExcludeFromCodeCoverage attribute does not exclude code inside a task workflow in an F# function
To Reproduce Project Code
Unit Test
Generate Code Coverage via command line
Expected behavior Expect the coverage file to not include any code in the hello function.
Actual behavior Coverage file picks up the body of the task in the hello function. It's listed as method MoveNext() line 13.
coverage.cobertura.xml
Configuration (please complete the following information): Please provide more information on your .NET configuration: