1lcovrc(5)                        User Manuals                        lcovrc(5)
2
3
4

NAME

6       lcovrc - lcov configuration file
7
8

DESCRIPTION

10       The  lcovrc  file  contains configuration information for the lcov code
11       coverage tool (see lcov(1)).
12
13       The system-wide configuration  file  is  located  at  /etc/lcovrc.   To
14       change settings for a single user, place a customized copy of this file
15       at location ~/.lcovrc.  Where available, command-line options  override
16       configuration file settings.
17
18       Lines in a configuration file can either be:
19
20            * empty  lines or lines consisting only of white space characters.
21              These lines are ignored.
22
23            * comment lines which start with a  hash  sign  ('#').  These  are
24              treated like empty lines and will be ignored.
25
26            * statements  in  the  form 'key = value'.  A list of valid state‐
27              ments and their description can be found  in  section  'OPTIONS'
28              below.
29
30       Example configuration:
31
32              #
33              # Example LCOV configuration file
34              #
35
36              # External style sheet file
37              #genhtml_css_file = gcov.css
38
39              # Coverage rate limits
40              genhtml_hi_limit = 90
41              genhtml_med_limit = 75
42
43              # Width of line coverage field in source code view
44              genhtml_line_field_width = 12
45
46              # Width of branch coverage field in source code view
47              genhtml_branch_field_width = 16
48
49              # Width of overview image
50              genhtml_overview_width = 80
51
52              # Resolution of overview navigation
53              genhtml_nav_resolution = 4
54
55              # Offset for source code navigation
56              genhtml_nav_offset = 10
57
58              # Do not remove unused test descriptions if non-zero
59              genhtml_keep_descriptions = 0
60
61              # Do not remove prefix from directory names if non-zero
62              genhtml_no_prefix = 0
63
64              # Do not create source code view if non-zero
65              genhtml_no_source = 0
66
67              # Specify size of tabs
68              genhtml_num_spaces = 8
69
70              # Highlight lines with converted-only data if non-zero
71              genhtml_highlight = 0
72
73              # Include color legend in HTML output if non-zero
74              genhtml_legend = 0
75
76              # Include HTML file at start of HTML output
77              #genhtml_html_prolog = prolog.html
78
79              # Include HTML file at end of HTML output
80              #genhtml_html_epilog = epilog.html
81
82              # Use custom HTML file extension
83              #genhtml_html_extension = html
84
85              # Compress all generated html files with gzip.
86              #genhtml_html_gzip = 1
87
88              # Include sorted overview pages
89              genhtml_sort = 1
90
91              # Include function coverage data display
92              #genhtml_function_coverage = 1
93
94              # Include branch coverage data display
95              #genhtml_branch_coverage = 1
96
97              # Specify the character set of all generated HTML pages
98              genhtml_charset=UTF-8
99
100              # Allow HTML markup in test case description text if non-zero
101              genhtml_desc_html=0
102
103              # Specify the precision for coverage rates
104              #genhtml_precision=1
105
106              # Show missed counts instead of hit counts
107              #genhtml_missed=1
108
109              # Demangle C++ symbols
110              #genhtml_demangle_cpp=1
111
112              # Location of the gcov tool
113              #geninfo_gcov_tool = gcov
114
115              # Adjust test names if non-zero
116              #geninfo_adjust_testname = 0
117
118              # Calculate a checksum for each line if non-zero
119              geninfo_checksum = 0
120
121              # Enable libtool compatibility mode if non-zero
122              geninfo_compat_libtool = 0
123
124              # Specify whether to capture coverage data for external source
125              # files
126              #geninfo_external = 1
127
128              # Use gcov's --all-blocks option if non-zero
129              #geninfo_gcov_all_blocks = 1
130
131              # Specify compatiblity modes (same as --compat option
132              # of geninfo)
133              #geninfo_compat = libtool=on, hammer=auto, split_crc=auto
134
135              # Adjust path to source files by removing or changing path
136              # components that match the specified pattern (Perl regular
137              # expression format)
138              #geninfo_adjust_src_path = /tmp/build => /usr/src
139
140              # Specify if geninfo should try to automatically determine
141              # the base-directory when collecting coverage data.
142              geninfo_auto_base = 1
143
144              # Use gcov intermediate format? Valid values are 0, 1, auto
145              geninfo_intermediate = auto
146
147              # Directory containing gcov kernel files
148              lcov_gcov_dir = /proc/gcov
149
150              # Location for temporary directories
151              lcov_tmp_dir = /tmp
152
153              # Show full paths during list operation if non-zero
154              lcov_list_full_path = 0
155
156              # Specify the maximum width for list output. This value is
157              # ignored when lcov_list_full_path is non-zero.
158              lcov_list_width = 80
159
160              # Specify the maximum percentage of file names which may be
161              # truncated when choosing a directory prefix in list output.
162              # This value is ignored when lcov_list_full_path is non-zero.
163              lcov_list_truncate_max = 20
164
165              # Specify if function coverage data should be collected and
166              # processed.
167              lcov_function_coverage = 1
168
169              # Specify if branch coverage data should be collected and
170              # processed.
171              lcov_branch_coverage = 0
172

OPTIONS

174       genhtml_css_file = filename
175
176              Specify  an external style sheet file. Use this option to modify
177              the appearance of the HTML output as generated by genhtml.  Dur‐
178              ing output generation, a copy of this file will be placed in the
179              output directory.
180
181              This option corresponds to the --css-file command line option of
182              genhtml.
183
184              By default, a standard CSS file is generated.
185
186       genhtml_hi_limit  = hi_limit
187       genhtml_med_limit = med_limit
188
189              Specify  coverage  rate limits for classifying file entries. Use
190              this option to modify the coverage rates (in percent) for  line,
191              function  and branch coverage at which a result is classified as
192              high, medium or low coverage. This  classification  affects  the
193              color  of the corresponding entries on the overview pages of the
194              HTML output:
195
196              High:   hi_limit  <= rate <= 100        default color: green
197              Medium: med_limit <= rate < hi_limit    default color: orange
198              Low:    0         <= rate < med_limit   default color: red
199
200              Defaults are 90 and 75 percent.
201
202       genhtml_line_field_width = number_of_characters
203
204              Specify the width (in characters) of the source code view column
205              containing line coverage information.
206
207              Default is 12.
208
209       genhtml_branch_field_width = number_of_characters
210
211              Specify the width (in characters) of the source code view column
212              containing branch coverage information.
213
214              Default is 16.
215
216       genhtml_overview_width = pixel_size
217
218              Specify the width (in pixel) of the overview image created  when
219              generating HTML output using the --frames option of genhtml.
220
221              Default is 80.
222
223       genhtml_nav_resolution = lines
224
225              Specify  the  resolution  of overview navigation when generating
226              HTML output using the --frames option of genhtml.   This  number
227              specifies the maximum difference in lines between the position a
228              user selected from the overview and the position the source code
229              window is scrolled to.
230
231              Default is 4.
232
233       genhtml_nav_offset = lines
234
235              Specify the overview navigation line offset as applied when gen‐
236              erating HTML output using the --frames option of genhtml.
237
238              Clicking a line in the overview image  should  show  the  source
239              code  view at a position a bit further up, so that the requested
240              line is not the first line in the window.  This number specifies
241              that offset.
242
243              Default is 10.
244
245       genhtml_keep_descriptions = 0|1
246
247              If  non-zero, keep unused test descriptions when generating HTML
248              output using genhtml.
249
250              This option corresponds to  the  --keep-descriptions  option  of
251              genhtml.
252
253              Default is 0.
254
255       genhtml_no_prefix = 0|1
256
257              If  non-zero, do not try to find and remove a common prefix from
258              directory names.
259
260              This option corresponds to the --no-prefix option of genhtml.
261
262              Default is 0.
263
264       genhtml_no_source = 0|1
265
266              If non-zero, do not create a source code  view  when  generating
267              HTML output using genhtml.
268
269              This option corresponds to the --no-source option of genhtml.
270
271              Default is 0.
272
273       genhtml_num_spaces = num
274
275              Specify the number of spaces to use as replacement for tab char‐
276              acters in the HTML source code view as generated by genhtml.
277
278              This option corresponds to the --num-spaces option of genthml.
279
280              Default is 8.
281
282
283       genhtml_highlight = 0|1
284
285              If non-zero, highlight lines with converted-only  data  in  HTML
286              output as generated by genhtml.
287
288              This option corresponds to the --highlight option of genhtml.
289
290              Default is 0.
291
292       genhtml_legend = 0|1
293
294              If  non-zero,  include  a legend explaining the meaning of color
295              coding in the HTML output as generated by genhtml.
296
297              This option corresponds to the --legend option of genhtml.
298
299              Default is 0.
300
301       genhtml_html_prolog = filename
302
303              If set, include the contents of the specified file at the begin‐
304              ning of HTML output.
305
306              This option corresponds to the --html-prolog option of genhtml.
307
308              Default is to use no extra prolog.
309
310       genhtml_html_epilog = filename
311
312              If set, include the contents of the specified file at the end of
313              HTML output.
314
315              This option corresponds to the --html-epilog option of genhtml.
316
317              Default is to use no extra epilog.
318
319       genhtml_html_extension = extension
320
321              If set, use the specified string as filename extension for  gen‐
322              erated HTML files.
323
324              This  option  corresponds to the --html-extension option of gen‐
325              html.
326
327              Default extension is "html".
328
329       genhtml_html_gzip = 0|1
330
331              If set, compress all html files using gzip.
332
333              This option corresponds to the --html-gzip option of genhtml.
334
335              Default extension is 0.
336
337       genhtml_sort = 0|1
338
339              If non-zero, create overview pages sorted by coverage rates when
340              generating HTML output using genhtml.
341
342              This  option  can  be  set to 0 by using the --no-sort option of
343              genhtml.
344
345              Default is 1.
346
347       genhtml_function_coverage = 0|1
348
349              If non-zero, include function coverage data when generating HTML
350              output using genhtml.
351
352              This  option can be set to 0 by using the --no-function-coverage
353              option of genhtml.
354
355              Default is 1.
356
357       genhtml_branch_coverage = 0|1
358
359              If non-zero, include branch coverage data when  generating  HTML
360              output using genhtml.
361
362              This  option  can  be set to 0 by using the --no-branch-coverage
363              option of genhtml.
364
365              Default is 1.
366
367       genhtml_charset = charset
368
369              Specify the character set of all generated HTML pages.
370
371              Use this option if the source code contains characters which are
372              not  part of the default character set. Note that this option is
373              ignored when a custom HTML prolog is specified  (see  also  gen‐
374              html_html_prolog).
375
376              Default is UTF-8.
377
378       genhtml_demangle_cpp = 0|1
379
380              If non-zero, demangle C++ function names in function overviews.
381
382              Set this option to one if you want to convert C++ internal func‐
383              tion names to human readable format  for  display  on  the  HTML
384              function  overview  page.  This option requires that the c++filt
385              tool is installed (see c++filt(1) ).
386
387              This option  corresponds  to  the  --demangle-cpp  command  line
388              option of genhtml.
389
390              Default is 0.
391
392       genhtml_desc_html = 0|1
393
394              If non-zero, test case descriptions may contain HTML markup.
395
396              Set  this  option  to  one if you want to embed HTML markup (for
397              example to include links) in test case descriptions. When set to
398              zero, HTML markup characters will be escaped to show up as plain
399              text on the test case description page.
400
401              Default is 0.
402
403       genhtml_precision = 1|2|3|4
404
405              Specify how many digits after the decimal-point should  be  used
406              for displaying coverage rates.
407
408              Default is 1.
409
410       genhtml_missed = 0|1
411
412              If  non-zero,  the count of missed lines, functions, or branches
413              is shown as negative numbers in overview pages.
414
415              Default is 0.
416
417       geninfo_gcov_tool = path_to_gcov
418
419              Specify the location of the gcov tool  (see  gcov(1))  which  is
420              used to generate coverage information from data files.
421
422              Default is 'gcov'.
423
424       geninfo_adjust_testname = 0|1
425
426              If  non-zero,   adjust  test  names  to include operating system
427              information when capturing coverage data.
428
429              Default is 0.
430
431       geninfo_checksum = 0|1
432
433              If non-zero, generate source code checksums when capturing  cov‐
434              erage  data.   Checksums  are useful to prevent merging coverage
435              data from incompatible source code versions but checksum genera‐
436              tion  increases  the size of coverage files and the time used to
437              generate those files.
438
439              This option corresponds to the --checksum and --no-checksum com‐
440              mand line option of geninfo.
441
442              Default is 0.
443
444       geninfo_compat_libtool = 0|1
445
446              If  non-zero,  enable  libtool  compatibility mode. When libtool
447              compatibility mode is enabled, lcov will assume that the  source
448              code relating to a .da file located in a directory named ".libs"
449              can be found in its parent directory.
450
451              This option corresponds to the  --compat-libtool  and  --no-com‐
452              pat-libtool command line option of geninfo.
453
454              Default is 1.
455
456       geninfo_external = 0|1
457
458              If non-zero, capture coverage data for external source files.
459
460              External  source files are files which are not located in one of
461              the directories (including  sub-directories)  specified  by  the
462              --directory or --base-directory options of lcov/geninfo.
463
464              Default is 1.
465
466       geninfo_gcov_all_blocks = 0|1
467
468              If non-zero, call the gcov tool with option --all-blocks.
469
470              Using  --all-blocks  will  produce more detailed branch coverage
471              information for each line. Set this option to zero if you do not
472              need  detailed  branch  coverage  information  to  speed  up the
473              process of capturing code coverage or to work around  a  bug  in
474              some versions of gcov which will cause it to endlessly loop when
475              analysing some files.
476
477              Default is 1.
478
479       geninfo_compat = mode=value[,mode=value,...]
480
481              Specify that geninfo should enable  one  or  more  compatibility
482              modes when capturing coverage data.
483
484              This  option  corresponds to the --compat command line option of
485              geninfo.
486
487              Default is 'libtool=on, hammer=auto, split_crc=auto'.
488
489       geninfo_adjust_src_path = pattern => replacement
490       geninfo_adjust_src_path = pattern
491
492              Adjust source paths when capturing coverage data.
493
494              Use this option in situations where geninfo cannot find the cor‐
495              rect path to source code files of a project. By providing a pat‐
496              tern in Perl regular expression format (see  perlre(1))  and  an
497              optional  replacement string, you can instruct geninfo to remove
498              or change parts of the incorrect source path.
499
500              Example:
501
502              1. When geninfo reports that it cannot find source file
503
504                  /path/to/src/.libs/file.c
505
506              while the file is actually located in
507
508                  /path/to/src/file.c
509
510              use the following parameter:
511
512                  geninfo_adjust_src_path = /.libs
513
514              This will remove all "/.libs" strings from the path.
515
516              2. When geninfo reports that it cannot find source file
517
518                  /tmp/build/file.c
519
520              while the file is actually located in
521
522                  /usr/src/file.c
523
524              use the following parameter:
525
526                  geninfo_adjust_src_path = /tmp/build => /usr/src
527
528              This will  change  all  "/tmp/build"  strings  in  the  path  to
529              "/usr/src".
530
531       geninfo_auto_base = 0|1
532
533              If  non-zero,  apply a heuristic to determine the base directory
534              when collecting coverage data.
535
536              Use this option  when  using  geninfo  on  projects  built  with
537              libtool  or  similar  build environments that work with multiple
538              base directories, i.e. environments, where the  current  working
539              directory  when invoking the compiler ist not the same directory
540              in which the source code file is located, and  in  addition,  is
541              different between files of the same project.
542
543              Default is 1.
544
545       geninfo_intermediate = 0|1|auto
546
547              Specify whether to use gcov intermediate format
548
549              Use  this  option to control whether geninfo should use the gcov
550              intermediate format while collecting coverage data. The  use  of
551              the  gcov  intermediate format should increase processing speed.
552              It also provides branch coverage data when using  the  --initial
553              command line option.
554
555              Valid  values are 0 for off, 1 for on, and "auto" to let geninfo
556              automatically use immediate format when supported by gcov.
557
558              Default is "auto".
559
560       lcov_gcov_dir = path_to_kernel_coverage_data
561
562              Specify the path to the directory where kernel coverage data can
563              be found or leave undefined for auto-detection.
564
565              Default is auto-detection.
566
567       lcov_tmp_dir = temp
568
569              Specify the location of a directory used for temporary files.
570
571              Default is '/tmp'.
572
573       lcov_list_full_path = 0|1
574
575              If  non-zero,  print the full path to source code files during a
576              list operation.
577
578              This option corresponds to the --list-full-path option of lcov.
579
580              Default is 0.
581
582       lcov_list_max_width = width
583
584              Specify the maximum width for list output. This value is ignored
585              when lcov_list_full_path is non-zero.
586
587              Default is 80.
588
589       lcov_list_truncate_max  = percentage
590
591              Specify  the maximum percentage of file names which may be trun‐
592              cated when choosing a directory  prefix  in  list  output.  This
593              value is ignored when lcov_list_full_path is non-zero.
594
595              Default is 20.
596
597       lcov_function_coverage = 0|1
598
599              Specify whether lcov should handle function coverage data.
600
601              Setting this option to 0 can reduce memory and CPU time consump‐
602              tion when lcov is collecting and processing  coverage  data,  as
603              well  as  reduce the size of the resulting data files. Note that
604              setting genhtml_function_coverage will override this option  for
605              HTML generation.
606
607              Default is 1.
608
609       lcov_branch_coverage = 0|1
610
611              Specify whether lcov should handle branch coverage data.
612
613              Setting this option to 0 can reduce memory and CPU time consump‐
614              tion when lcov is collecting and processing  coverage  data,  as
615              well  as  reduce the size of the resulting data files. Note that
616              setting genhtml_branch_coverage will override  this  option  for
617              HTML generation.
618
619              Default is 0.
620
621       lcov_excl_line = expression
622
623              Specify the regular expression of lines to exclude.
624
625              Default is 'LCOV_EXCL_LINE'.
626
627       lcov_excl_br_line = expression
628
629              Specify  the  regular expression of lines to exclude from branch
630              coverage.
631
632              Default is 'LCOV_EXCL_BR_LINE'.
633

FILES

635       /etc/lcovrc
636              The system-wide lcov configuration file.
637
638
639       ~/.lcovrc
640              The individual per-user configuration file.
641

SEE ALSO

643       lcov(1), genhtml(1), geninfo(1), gcov(1)
644
645
646
6472020-01-29                         LCOV 1.14                         lcovrc(5)
Impressum