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] Custom context with JSON file reporter produces invalid JSON #1181

Closed
miki-shapr opened this issue Jun 18, 2021 · 0 comments · Fixed by #1182
Closed

[BUG] Custom context with JSON file reporter produces invalid JSON #1181

miki-shapr opened this issue Jun 18, 2021 · 0 comments · Fixed by #1182
Labels

Comments

@miki-shapr
Copy link

Describe the bug
Adding a custom context (--benchmark_context) and using the JSON reporter (--benchmark_out_format), the line preceding the custom context entry does not have a comma at the end resulting in an invalid JSON file.

System
Which OS, compiler, and compiler version are you using:

  • OS: macOS
  • Compiler and version: Apple clang version 12.0.5

To reproduce
Steps to reproduce the behavior:

  1. sync to commit 80a6261
  2. cmake -DCMAKE_BUILD_TYPE=Release ...
  3. make
  4. See error

Expected behavior
The line before the custom context entry should have a comman (,) at the end if there is a context entry.

Screenshots
Screenshot 2021-06-18 at 15 50 55

Additional context
N/A

dmah42 added a commit that referenced this issue Jun 18, 2021
@dmah42 dmah42 added the bug label Jun 18, 2021
dmah42 pushed a commit that referenced this issue Jun 18, 2021
* Add missing trailing commas

Fixes #1181

* Better trailing commas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants