Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: If only output directory defined, the resulting file name contain directory name. #42

Open
WebDucer opened this issue May 5, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@WebDucer
Copy link

WebDucer commented May 5, 2021

I have the following behavior, if I set only the CoverletOutputDirectory without filename. The resulting files are written to the parent directory with combined filename of directory+format.

Example for configuration:

var covSettings = new CoverletSettings {
  CoverletOutputDirectory = Directory("./Output/TestResults"),
  CoverletOutputFormat = CoverletOutputFormat.opencover | CoverletOutputFormat. cobertura,
  CollectCoverage = true
}

I get the following dorectory / file structure:

  • Output
    • TestResults.opencoder.xml
    • TestResults.cobertura.xml

instead of the expected structure:

  • Output
    • TestResults
      • results.opencover.xml
      • results.cobertura.xml

As I see in commandl ine, the path is send without ending /, so coverlet treat this as a file.

As described here (https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/MSBuildIntegration.md) coverlet treat the CoverletOutput parameter as directory, if this ends with /, as file in other cases.

@Romanx
Copy link
Owner

Romanx commented May 6, 2021

Hi there,

Thaks for the report, i'll look at the fixing this shortly and pushing a new build.

@Romanx Romanx added the bug Something isn't working label May 6, 2021
@Romanx Romanx self-assigned this May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants