GRCOV(1)

πŸ’– GRCOV(1) β€” User Commands energy πŸ’–

okay bestie, pull up a chair, we're doing grcov(1), the coolest little coverage gremlin in the User Commands section πŸ’…


✨ NAME ✨

grcov β€” literally just grcov, that's the whole name, she needs no introduction πŸ‘‘


🌈 SYNOPSIS 🌈

grcov [OPTIONS] <PATHS>...

she takes paths and she takes options and she does the thing πŸ¦‹


πŸŽ€ DESCRIPTION πŸŽ€

grcov β€” brought to you by Marco Castelluccio <mcastelluccio@mozilla.com> 🫢 β€” parses, collects and aggregates code coverage data for multiple source files. that's it. that's the whole job. she ate and left no crumbs πŸ’–

🌸 Arguments:

  • <PATHS>... β€” sets the input paths to use πŸ”₯ like, the actual files you want her to look at, bestie. feed her the paths.

πŸ’… OPTIONS πŸ’…

the main character section. every single flag, all of them, no skips, no cuts, periodt ✨

  • -b, --binary-path <PATH> β€” sets the path to the compiled binary to be used 🧚
  • --llvm-path <PATH> β€” sets the path to the LLVM bin directory πŸ“
  • -t, --output-types <OUTPUT TYPE> β€” comma separated list of custom output types, and bestie there are SO many flavors 🌈:
    • html for a HTML coverage report
    • coveralls for the Coveralls specific format
    • lcov for the lcov INFO format
    • covdir for the covdir recursive JSON format
    • coveralls+ for the Coveralls specific format with function information
    • ade for the ActiveData-ETL specific format
    • files to only return a list of files
    • markdown for human easy read
    • cobertura for output in cobertura format
    • cobertura-pretty to pretty-print in cobertura format

[default: lcov] β€” so if you don't say anything she picks lcov for you, she's thoughtful like that πŸ’–

  • -o, --output-path <PATH> β€” specifies the output path. this is a file for a single output type and must be a folder for multiple output types πŸ“ (yes, one type = file, many types = folder, don't fight her on this)
  • --output-config-file <PATH> β€” specifies the output config file πŸŽ€
  • -s, --source-dir <DIRECTORY> β€” specifies the root directory of the source files 🌸
  • -p, --prefix-dir <PATH> β€” specifies a prefix to remove from the paths (like, e.g. if grcov is run on a different machine than the one that generated the code coverage information) πŸ–₯️✨
  • --ignore-not-existing β€” ignore source files that can't be found on the disk πŸ™ˆ ghost files? not her problem
  • --ignore-parsing-error β€” ignore error when parsing the coverage files πŸ’€ she's choosing peace
  • --ignore <PATH> β€” ignore files/directories specified as globs πŸ¦‹
  • --keep-only <PATH> β€” keep only files/directories specified as globs πŸ‘‘
  • --path-mapping <PATH> β€” yeah the manpage gives you no description here, bestie, she just exists. iconic mysterious behavior fr fr
  • --branch β€” enables parsing branch coverage information 🌿
  • --filter <FILTER> β€” filters out covered/uncovered files. use 'covered' to only return covered files, 'uncovered' to only return uncovered files πŸ”

[possible values: covered, uncovered]

  • --sort-output-types <OUTPUT TYPES> β€” comma separated list of output types to sort files lexicographically for πŸ“š

[default: markdown]

  • --llvm β€” speeds-up parsing, when the code coverage information is exclusively coming from a llvm build ⚑
  • --token <TOKEN> β€” sets the repository token from Coveralls, required for the 'coveralls' and 'coveralls+' formats πŸ”‘ (required bestie, don't forget it)
  • --commit-sha <COMMIT HASH> β€” sets the hash of the commit used to generate the code coverage data πŸ’Ύ
  • --service-name <SERVICE NAME> β€” sets the service name 🏷️
  • --service-number <SERVICE NUMBER> β€” sets the service number πŸ”’
  • --service-job-id <SERVICE JOB ID> β€” sets the service job id πŸ’Ό

[aliases: --service-job-number]

  • --service-pull-request <SERVICE PULL REQUEST> β€” sets the service pull request number 🫢
  • --service-flag-name <SERVICE FLAG NAME> β€” sets the service flag name for coveralls parallel/carryover mode 🚩
  • --parallel β€” sets the build type to be parallel for 'coveralls' and 'coveralls+' formats πŸƒβ™€οΈπŸ’¨
  • --threads <NUMBER> β€” another one where the manpage just leaves you hanging, no description, she's a woman of mystery 🧚 (but the number is right there in the name, iykyk)
  • --precision <NUMBER> β€” sets coverage decimal point precision on output reports 🎯

[default: 2]

  • --guess-directory-when-missing β€” again, no description in the original. she guesses. the directory. when it's missing. do with that what you will ✨
  • --vcs-branch <VCS BRANCH> β€” set the branch for coveralls report. defaults to 'master' 🌳

[default: master]

  • --log <LOG> β€” set the file where to log (or stderr or stdout). defaults to 'stderr' πŸ“

[default: stderr]

  • --log-level <LEVEL> β€” set the log level πŸ”Š

[default: ERROR] [possible values: OFF, ERROR, WARN, INFO, DEBUG, TRACE]

  • --incl-explicit <PATH> β€” provides a json file with explicit list of files and lines to include into the report. the json format is { "path": [[1, 2], ...], ... }, where the numbers are inclusive and 1-based line ranges πŸ“‹ (inclusive AND 1-based, bestie, write that down)
  • --excl-line <regex> β€” lines in covered files containing this marker will be excluded βœ‚οΈ
  • --excl-start <regex> β€” marks the beginning of an excluded section. the current line is part of this section 🚧
  • --excl-stop <regex> β€” marks the end of an excluded section. the current line is part of this section πŸ›‘
  • --excl-br-line <regex> β€” lines in covered files containing this marker will be excluded from branch coverage πŸŒΏβœ‚οΈ
  • --excl-br-start <regex> β€” marks the beginning of a section excluded from branch coverage. the current line is part of this section 🚧🌿
  • --excl-br-stop <regex> β€” marks the end of a section excluded from branch coverage. the current line is part of this section πŸ›‘πŸŒΏ
  • --no-demangle β€” no symbol demangling 🀐
  • --abs-link-prefix <LINK PREFIX> β€” generate absolute HTML links with the given prefix πŸ”—
  • --no-date β€” do not include the current date in the HTML report πŸ“…πŸš«
  • --html-resources <SOURCE> β€” where to retrieve the CSS files used to style the HTML reports 🎨

[default: bundled] [possible values: bundled, cdn]

  • -h, --help β€” print help (see a summary with '-h') πŸ’¬
  • -V, --version β€” print version 🏷️

⚠️ bestie reminder: --token is required for the 'coveralls' and 'coveralls+' formats, and -o, --output-path has to be a folder the moment you're doing multiple output types. rules are rules πŸ’…

and that's the whole page, no notes 🫢 this was grcov version 0.10.7, fresh from July 2026 β€” go get your coverage, main character πŸ’–βœ¨πŸ¦‹πŸŒΈπŸŽ€πŸ’…πŸ‘‘

πŸ“¦ where this page comes from