From 1d5ed97fd2fa8209324da6b8e8ee955dbdbf82db Mon Sep 17 00:00:00 2001 From: Karol Sewilo Date: Thu, 12 Dec 2024 10:39:45 +0100 Subject: [PATCH] Add docs commit-id:df74d8eb --- CHANGELOG.md | 7 +++++++ README.md | 19 ++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf65981..8749065 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +#### Added + +- `cairo-coverage clean` command to remove all generated files. This is useful as by default, the coverage report is + appended to the existing one. So if you want to start fresh, you can use this command. + ## [0.3.0] - 2024-12-09 #### Added diff --git a/README.md b/README.md index c3721ea..cdb4482 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,20 @@ curl -L https://raw.githubusercontent.com/software-mansion/cairo-coverage/main/s ## Usage +### Help + +To see the available commands and options, run: + +```shell +cairo-coverage --help +``` + +Using the `--help` flag with any command will display additional information about that specific command. + +```shell +cairo-coverage clean --help +``` + ### `.cairo-coverage-ignore` File You can create a `.cairo-coverage-ignore` file in the root of your project to specify the files or directories that you @@ -64,11 +78,10 @@ To generate a coverage report, run the `cairo-coverage` command with one or more arguments specify the paths to the JSON files containing the trace data to be used for generating the coverage report. ```shell -cairo-coverage path/to/trace/1.json path/to/trace/2.json path/to/trace/3.json +cairo-coverage run path/to/trace/1.json path/to/trace/2.json path/to/trace/3.json ``` -Optionally, you can specify an output file path using the `--output-path ` option. If not provided, the -output file will default to `coverage.lcov`. +Due to historical reasons, the `run` command is optional and can be omitted. But we plan to remove it in the future. The generated output file is in the `lcov` format. For your convenience, you can find an explanation along with a simple example of the `lcov` format [here](./lcov.md).