https://github.com/botffy/jacoco-codeclimate-reporter
Quick and dirty JaCoCo test coverage reporter script for Code Climate
https://github.com/botffy/jacoco-codeclimate-reporter
code-climate jacoco
Last synced: 6 months ago
JSON representation
Quick and dirty JaCoCo test coverage reporter script for Code Climate
- Host: GitHub
- URL: https://github.com/botffy/jacoco-codeclimate-reporter
- Owner: Botffy
- Created: 2016-12-07T23:57:00.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-10-21T07:05:44.000Z (about 6 years ago)
- Last Synced: 2025-03-30T12:33:47.580Z (10 months ago)
- Topics: code-climate, jacoco
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Quick and dirty [JaCoCo](http://www.eclemma.org/jacoco/) test coverage reporter script for [Code Climate](https://codeclimate.com). "It may prove useful to some of you, someday, perhaps... in a somewhat bizarre circumstances."
Based heavily on [Code Climate's Python test reporter](https://github.com/codeclimate/python-test-reporter). In fact, the file about the CIs was blatantly ripped out from that.
# Requirements
Python 3 and the [Requests library](http://docs.python-requests.org/en/master/).
# Usage
`python report-jacoco.py FILENAME [SOURCE_ROOT_DIR] [PROJECT_ROOT_DIR]`
- `FILENAME` should point at JaCoCo's XML report.
- `SOURCE_ROOT_DIR` is the root directory of the tested sources. The Java package names will be prefixed with this.
- `PROJECT_ROOT_DIR` is the root directory of your project. Should be a prefix of `SOURCE_ROOT_DIR`. Useful if you run this from elsewhere.
The script expects you to provide your [authentication token]() in an environmental variable named `CODECLIMATE_REPO_TOKEN`.
# Limitations
JaCoCo does not really measure hits. We just report 1 for every line we deem tested. And a line is deemed to be "tested" is it has more instructions hit than missed.