Skip to content

HideColumns + custom corerun = incorrect table markdown #2545

Closed
@EgorBo

Description

@EgorBo

Minimal repro:

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;

BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);

[HideColumns("Job", "StdDev", "RatioSD")]
public class MyBench
{
    [Benchmark]
    public bool Test() => true;
}

If I run this benchmark with a custom corerun, e.g.:

dotnet run -c Release -- --filter "*" --coreRun Path\to\corerun.exe

it outputs this:

| Method | Mean      | Error     |
|------- |----------:|----------:|-
| Test   | 0.0062 ns | 0.0042 ns |

that trailing |- on the 2nd row makes the whole markdown invalid, e.g. here is what happens if I paste it here:

| Method | Mean | Error |
|------- |----------:|----------:|-
| Test | 0.0062 ns | 0.0042 ns |

While it should be:

Method Mean Error
Test 0.0062 ns 0.0042 ns

I can try to fix it myself unless you know that it can be trivially fixed 🙂

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions