-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathcodecov.yml
More file actions
67 lines (63 loc) · 2.43 KB
/
codecov.yml
File metadata and controls
67 lines (63 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# Copyright (c) 2025 Alan de Freitas (alandefreitas@gmail.com)
#
# Official repository: https://github.com/cppalliance/mrdocs
#
# Codecov Configuration
# https://docs.codecov.com/docs/codecovyml-reference
#
# Patch Coverage Threshold Rationale
# ==================================
#
# We allow a small threshold for patch coverage NOT because reduced coverage
# is acceptable, but because some lines are inherently uncoverable and
# produce false positives:
#
# - Class declarations (e.g., `class Foo : public Bar`)
# - Struct declarations (e.g., `struct MyTest`)
# - Access specifiers (`public:`, `private:`)
# - Pure virtual method declarations
# - Opening/closing braces on their own lines
#
# These are not executable code - they don't generate machine instructions -
# yet coverage tools (gcov) report them as "uncovered lines."
#
# Preferred Solutions (in order)
# ------------------------------
#
# 1st best: Configure gcov/lcov to exclude declarations from coverage
# tracking entirely, so they never appear as uncovered lines.
# This would eliminate false positives at the source.
# Status: Not currently available/configured.
#
# 2nd best: Use an absolute threshold (e.g., "allow up to 5 uncovered lines")
# rather than a percentage. This would be precise and predictable.
# Status: Codecov only supports percentage-based thresholds.
#
# 3rd best: Use a percentage-based threshold (what we implement below).
# The threshold is set small enough that any real logic
# (conditionals, loops, function bodies, error paths) that isn't
# covered will still trigger a failure. Only trivial declaration
# noise should pass through.
#
# With typical PR sizes, a 90% patch target achieves a similar effect to
# allowing ~5 uncovered lines in a 50-line change.
coverage:
status:
# Project-wide coverage should not decrease
project:
default:
threshold: 1%
# Patch coverage: only applies to new/modified lines in the PR
patch:
default:
target: 90%
ignore:
# This file contains a bunch of Boost.Describe macro invocations
# which are not executable code and produce false positives in
# coverage reports.
- "src/lib/Support/Reflection/Reflection.hpp"