lcovrc(5) | User Manuals | lcovrc(5) |
lcovrc - lcov configuration file
The lcovrc file contains configuration information for the lcov code coverage tool (see lcov(1)).
The system-wide configuration file is located at /etc/lcovrc. To change settings for a single user, place a customized copy of this file at location ~/.lcovrc. Where available, command-line options override configuration file settings.
Lines in a configuration file can either be:
Example configuration:
# External style sheet file
#genhtml_css_file = gcov.css
# Coverage rate limits
genhtml_hi_limit = 90
genhtml_med_limit = 75
# Width of line coverage field in source code view
genhtml_line_field_width = 12
# Width of branch coverage field in source code view
genhtml_branch_field_width = 16
# Width of overview image
genhtml_overview_width = 80
# Resolution of overview navigation
genhtml_nav_resolution = 4
# Offset for source code navigation
genhtml_nav_offset = 10
# Do not remove unused test descriptions if non-zero
genhtml_keep_descriptions = 0
# Do not remove prefix from directory names if non-zero
genhtml_no_prefix = 0
# Do not create source code view if non-zero
genhtml_no_source = 0
# Specify size of tabs
genhtml_num_spaces = 8
# Highlight lines with converted-only data if non-zero
genhtml_highlight = 0
# Include color legend in HTML output if non-zero
genhtml_legend = 0
# Include HTML file at start of HTML output
#genhtml_html_prolog = prolog.html
# Include HTML file at end of HTML output
#genhtml_html_epilog = epilog.html
# Use custom HTML file extension
#genhtml_html_extension = html
# Compress all generated html files with gzip.
#genhtml_html_gzip = 1
# Include sorted overview pages
genhtml_sort = 1
# Include function coverage data display
#genhtml_function_coverage = 1
# Include branch coverage data display
#genhtml_branch_coverage = 1
# Specify the character set of all generated HTML pages
genhtml_charset=UTF-8
# Allow HTML markup in test case description text if non-zero
genhtml_desc_html=0
# Specify the precision for coverage rates
#genhtml_precision=1
# Show missed counts instead of hit counts
#genhtml_missed=1
# Demangle C++ symbols
#genhtml_demangle_cpp=1
# Location of the gcov tool
#geninfo_gcov_tool = gcov
# Adjust test names if non-zero
#geninfo_adjust_testname = 0
# Calculate a checksum for each line if non-zero
geninfo_checksum = 0
# Enable libtool compatibility mode if non-zero
geninfo_compat_libtool = 0
# Specify whether to capture coverage data for external source
# files
#geninfo_external = 1
# Use gcov's --all-blocks option if non-zero
#geninfo_gcov_all_blocks = 1
# Specify compatiblity modes (same as --compat option
# of geninfo)
#geninfo_compat = libtool=on, hammer=auto, split_crc=auto
# Adjust path to source files by removing or changing path
# components that match the specified pattern (Perl regular
# expression format)
#geninfo_adjust_src_path = /tmp/build => /usr/src
# Specify if geninfo should try to automatically determine
# the base-directory when collecting coverage data.
geninfo_auto_base = 1
# Directory containing gcov kernel files
lcov_gcov_dir = /proc/gcov
# Location for temporary directories
lcov_tmp_dir = /tmp
# Show full paths during list operation if non-zero
lcov_list_full_path = 0
# Specify the maximum width for list output. This value is
# ignored when lcov_list_full_path is non-zero.
lcov_list_width = 80
# Specify the maximum percentage of file names which may be
# truncated when choosing a directory prefix in list output.
# This value is ignored when lcov_list_full_path is non-zero.
lcov_list_truncate_max = 20
# Specify if function coverage data should be collected and
# processed.
lcov_function_coverage = 1
# Specify if branch coverage data should be collected and
# processed.
lcov_branch_coverage = 0
genhtml_css_file = filename
This option corresponds to the --css-file command line option of genhtml.
By default, a standard CSS file is generated.
genhtml_hi_limit = hi_limit
genhtml_med_limit = med_limit
High: hi_limit <= rate <= 100 default color: green
Medium: med_limit <= rate < hi_limit default color: orange
Low: 0 <= rate < med_limit default color: red
Defaults are 90 and 75 percent.
genhtml_line_field_width = number_of_characters
Default is 12.
genhtml_branch_field_width = number_of_characters
Default is 16.
genhtml_overview_width = pixel_size
Default is 80.
genhtml_nav_resolution = lines
Default is 4.
genhtml_nav_offset = lines
Clicking a line in the overview image should show the source code view at a position a bit further up, so that the requested line is not the first line in the window. This number specifies that offset.
Default is 10.
genhtml_keep_descriptions = 0|1
This option corresponds to the --keep-descriptions option of genhtml.
Default is 0.
genhtml_no_prefix = 0|1
This option corresponds to the --no-prefix option of genhtml.
Default is 0.
genhtml_no_source = 0|1
This option corresponds to the --no-source option of genhtml.
Default is 0.
genhtml_num_spaces = num
This option corresponds to the --num-spaces option of genthml.
Default is 8.
genhtml_highlight = 0|1
This option corresponds to the --highlight option of genhtml.
Default is 0.
genhtml_legend = 0|1
This option corresponds to the --legend option of genhtml.
Default is 0.
genhtml_html_prolog = filename
This option corresponds to the --html-prolog option of genhtml.
Default is to use no extra prolog.
genhtml_html_epilog = filename
This option corresponds to the --html-epilog option of genhtml.
Default is to use no extra epilog.
genhtml_html_extension = extension
This option corresponds to the --html-extension option of genhtml.
Default extension is "html".
genhtml_html_gzip = 0|1
This option corresponds to the --html-gzip option of genhtml.
Default extension is 0.
genhtml_sort = 0|1
This option can be set to 0 by using the --no-sort option of genhtml.
Default is 1.
genhtml_function_coverage = 0|1
This option can be set to 0 by using the --no-function-coverage option of genhtml.
Default is 1.
genhtml_branch_coverage = 0|1
This option can be set to 0 by using the --no-branch-coverage option of genhtml.
Default is 1.
genhtml_charset = charset
Use this option if the source code contains characters which are not part of the default character set. Note that this option is ignored when a custom HTML prolog is specified (see also genhtml_html_prolog).
Default is UTF-8.
genhtml_demangle_cpp = 0|1
Set this option to one if you want to convert C++ internal function names to human readable format for display on the HTML function overview page. This option requires that the c++filt tool is installed (see c++filt(1) ).
This option corresponds to the --demangle-cpp command line option of genhtml.
Default is 0.
genhtml_desc_html = 0|1
Set this option to one if you want to embed HTML markup (for example to include links) in test case descriptions. When set to zero, HTML markup characters will be escaped to show up as plain text on the test case description page.
Default is 0.
genhtml_precision = 1|2|3|4
Default is 1.
genhtml_missed = 0|1
Default is 0.
geninfo_gcov_tool = path_to_gcov
Default is 'gcov'.
geninfo_adjust_testname = 0|1
Default is 0.
geninfo_checksum = 0|1
This option corresponds to the --checksum and --no-checksum command line option of geninfo.
Default is 0.
geninfo_compat_libtool = 0|1
This option corresponds to the --compat-libtool and --no-compat-libtool command line option of geninfo.
Default is 1.
geninfo_external = 0|1
External source files are files which are not located in one of the directories (including sub-directories) specified by the --directory or --base-directory options of lcov/geninfo.
Default is 1.
geninfo_gcov_all_blocks = 0|1
Using --all-blocks will produce more detailed branch coverage information for each line. Set this option to zero if you do not need detailed branch coverage information to speed up the process of capturing code coverage or to work around a bug in some versions of gcov which will cause it to endlessly loop when analysing some files.
Default is 1.
geninfo_compat = mode=value[,mode=value,...]
This option corresponds to the --compat command line option of geninfo.
Default is 'libtool=on, hammer=auto, split_crc=auto'.
geninfo_adjust_src_path = pattern =>
replacement
geninfo_adjust_src_path = pattern
Use this option in situations where geninfo cannot find the correct path to source code files of a project. By providing a pattern in Perl regular expression format (see perlre(1)) and an optional replacement string, you can instruct geninfo to remove or change parts of the incorrect source path.
Example:
1. When geninfo reports that it cannot find source file
/path/to/src/.libs/file.c
while the file is actually located in
/path/to/src/file.c
use the following parameter:
geninfo_adjust_src_path = /.libs
This will remove all "/.libs" strings from the path.
2. When geninfo reports that it cannot find source file
/tmp/build/file.c
while the file is actually located in
/usr/src/file.c
use the following parameter:
geninfo_adjust_src_path = /tmp/build => /usr/src
This will change all "/tmp/build" strings in the path to "/usr/src".
geninfo_auto_base = 0|1
Use this option when using geninfo on projects built with libtool or similar build environments that work with multiple base directories, i.e. environments, where the current working directory when invoking the compiler ist not the same directory in which the source code file is located, and in addition, is different between files of the same project.
Default is 1.
lcov_gcov_dir = path_to_kernel_coverage_data
Default is auto-detection.
lcov_tmp_dir = temp
Default is '/tmp'.
lcov_list_full_path = 0|1
This option corresponds to the --list-full-path option of lcov.
Default is 0.
lcov_list_max_width = width
Default is 80.
lcov_list_truncate_max = percentage
Default is 20.
lcov_function_coverage = 0|1
Setting this option to 0 can reduce memory and CPU time consumption when lcov is collecting and processing coverage data, as well as reduce the size of the resulting data files. Note that setting genhtml_function_coverage will override this option for HTML generation.
Default is 1.
lcov_branch_coverage = 0|1
Setting this option to 0 can reduce memory and CPU time consumption when lcov is collecting and processing coverage data, as well as reduce the size of the resulting data files. Note that setting genhtml_branch_coverage will override this option for HTML generation.
Default is 0.
lcov_excl_line = expression
Default is 'LCOV_EXCL_LINE'.
lcov_excl_br_line = expression
Default is 'LCOV_EXCL_BR_LINE'.
LCOV 1.14 | 2019-08-17 |