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.

diff cover json report don't contain the total lines' number

See original GitHub issue

Is that any support that the json report contains the diff total lines’ number?

The total lines number is import for report display? Is it should be given?

Json report is generated in the below cmd:

diff-cover my_jacoco.xml --compare-branch origin/master --src-roots my_project/my_module/src/main/java --json-report my_diff_cover_report.json

The report contains total_num_lines and violation_lines and its line number but no line number as total_lines.

{
  "report_name": "XML",
  "diff_name": "origin/master...HEAD, staged and unstaged changes",
  "src_stats": {
    "my_module/src/main/java/com/zsmallx/example/java_calculator/JCalculator.java": {
      "percent_covered": 50.0,
      "violation_lines": [
        13
      ],
      "violations": [
        [
          13,
          null
        ]
      ]
    }
  },
  "total_num_lines": 2,
  "total_num_violations": 1,
  "total_percent_covered": 50
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Bachmann1234commented, Jun 22, 2021

@ZSmallX

This is released. @kasium did the work im just the messenger https://pypi.org/project/diff-cover/5.3.0/

1reaction
Bachmann1234commented, Jan 22, 2021

No support currently. But I would approve and release a pr that added that

Read more comments on GitHub >

github_iconTop Results From Across the Web

Count number of lines in a git repository - Stack Overflow
I am just pulling it up here so that it doesn't go unnoticed. The credit for this should go to @FRoZeN (and @ephemient)....
Read more >
DeepDiff 4.0.7 documentation - Read the Docs
A DeepDiff object that has already calculated the difference of the 2 items. Supported data types. int, string, unicode, dictionary, list, tuple, set,...
Read more >
istanbul-diff - npm
Uses jsondiffpatch to find & report diffs between two istanbul JSON code coverage summaries in the vein of coveralls.
Read more >
JSON formatting with jq and CI/CD linting automation - GitLab
Learn how to filter in JSON data structures and interact with the REST API. Use the GitLab API to lint your CI/CD configuration...
Read more >
CLOC -- Count Lines of Code
The inputs may be pairs of files, directories, or archives. Use --diff-alignment to generate a list showing which file pairs where compared. See...
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