question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clarify how to supply format on the command line in the documentation

See original GitHub issue

The documentation specifies that the only option that one can provide without using a dedicated coverlet.runsettings file is the Format option. Unfortunately the documentation fails to detail exactly how to use this option on the command line.

Can this be amended to the section above the options table, please?

Issue Analytics

  • State:closed
  • Created 8 months ago
  • Comments:7

github_iconTop GitHub Comments

3reactions
fhnaseercommented, Feb 6, 2023

I digged around a bit and found out that this is the default behavior of vstest datacollector base class we derive from. This can be seen here https://github.com/microsoft/vstest/blob/main/src/vstest.console/Processors/CollectArgumentProcessor.cs#L247-L250. So even though this isn’t officially documented by the vstest guys (doc), it is working. So you basically can pass parameters like:

dotnet test --collect:"XPlat Code Coverage;Format=json;Hello=world"

This change adds/updates elements inside collector element in the runsettings file. It was added to specify output format without using a runsettings or overriding runsettings file for MS code coverage scenario.

dotnet test --collect:"Code Coverage;Format=Cobertura"

<DataCollectors>
  <DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0">
    <Configuration>
      <Format>Cobertura</Format>      <=================== This line is added into the runsettings file.

However, the implementation is generic and can be used by others as well. So, coverlet can also use similar command to specify format.

2reactions
silkfirecommented, Feb 16, 2023

The wording is much clearer now and in-tune with the official documentation. I really appreciate it, thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Document command-line syntax
This page shows how to document command-line commands and their arguments. For more information about formatting code that appears in text, placeholders, ...
Read more >
Is there a "standard" format for command line/shell help text?
It is a formal standard for documenting (and automatically parsing) command line arguments. For example... Usage: my_program command --option < ...
Read more >
Command Line for Beginners – How to Use the Terminal ...
Hi everyone! In this article we'll take a good look at the command line (also known as the CLI, console, terminal or shell)....
Read more >
format | Microsoft Learn
Reference article for the format command that formats a drive to accept Windows files.
Read more >
What is a command-line interface (CLI)?
A command-line interface (CLI) is a text-based user interface (UI) used to run programs, manage computer files and interact with the computer.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found