Skip to content

Files

Latest commit

 

History

History
83 lines (47 loc) · 2.36 KB

cc-test-reporter-format-coverage.1.md

File metadata and controls

83 lines (47 loc) · 2.36 KB

% CC-TEST-REPORTER-FORMAT-COVERAGE(1) User Manuals % Code Climate hello@codeclimate.com % February 2017

PROLOG

This is a sub-command of cc-test-reporter(1).

SYNOPSIS

cc-test-reporter-format-coverage [--output=<path>] [--prefix=] cc-test-reporter-format-coverage [--input-type=<coverage type>] [--output=<path>] [--prefix=<path>] [--add-prefix=<path>] [COVERAGE_FILE]

DESCRIPTION

Locate, parse, and re-format supported coverage sources.

OPTIONS

-t, --input-type simplecov|lcov|coverage.py|gcov|clover|dotcover

Identifies the input type (format) of the COVERAGE_FILE.

-o, --output PATH

Output to PATH. If - is given, content will be written to stdout. Defaults to coverage/codeclimate.json.

-p, --prefix PATH

The prefix to remove from absolute paths in coverage payloads, to make them relative to the project root. This is usually the directory in which the tests were run. Defaults to current working directory.

--add-prefix PATH

The prefix to add to file paths in coverage payloads, to make them match the project's directory structure.

COVERAGE_FILE

Path to the coverage file to process. Defaults to searching known paths where coverage files could exist and selecting the first one found.

SUPPORTED SOURCES

The formatter will look for each of the paths in the following list and process the first found as the language or format specified.

./coverage/.resultset.json Ruby

As generated by the SimpleCov library.

./lcov.info JavaScript, C/C++

As generated by Istanbul, Lab test runner, or any gcov-compatible tool.

./.coverage Python

As generated by coverage.py.

./build/logs/clover.xml PHP

As generated by phpunit --coverage-clover.

./cover.out Go

As generated by go test -coverprofile=c.out

./dotcover.xml DotCover

As generated by dotnet dotcover test --dcReportType=DetailedXML --dcOutput="dotcover.xml"

ENVIRONMENT VARIABLES

GIT_BRANCH, GIT_COMMIT_SHA, and GIT_COMMITTED_AT are required. CI_NAME, CI_BUILD_ID, and CI_BUILD_URL will be used if present.

JACOCO_SOURCE_PATH, if present, explicitly sets the path to Java source files when using the JaCoCo format. You can set multiple source paths by including them separated by white space.

For example, JACOCO_SOURCE_PATH="app1/main app2/main".

See cc-test-reporter-env(1).