From 7b9e73900f1e36973adf0a544ee5e355cbc111eb Mon Sep 17 00:00:00 2001 From: Alan de Freitas Date: Mon, 22 Dec 2025 19:45:33 -0500 Subject: [PATCH 1/4] ci: add codecov configuration --- codecov.yml | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..3502c3f47 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,61 @@ +# +# 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% From 48af22e94625167ea6c6d86d399109e5e0a1c79e Mon Sep 17 00:00:00 2001 From: Alan de Freitas Date: Mon, 22 Dec 2025 18:55:07 -0500 Subject: [PATCH 2/4] fix: hide anchor links when wrapper is not included --- .../generator/html/layouts/wrapper.html.hbs | 5 + .../generator/html/partials/markup/h.html.hbs | 6 +- .../config/auto-brief/auto-brief.html | 96 +- .../config/auto-brief/no-auto-brief.html | 96 +- .../brief-from-function-class.html | 39 +- .../brief-from-operator.html | 30 +- .../param-from-function-class.html | 45 +- .../param-from-operator.html | 24 +- .../returns-from-brief.html | 15 +- .../returns-from-return-brief.html | 9 +- .../returns-from-special.html | 87 +- .../config/auto-relates/auto-relates.html | 24 +- .../config/auto-relates/derived.html | 33 +- .../config/auto-relates/enum.html | 21 +- .../config/auto-relates/no-auto-relates.html | 24 +- .../config/auto-relates/qualified.html | 36 +- .../config/auto-relates/remove-friend.html | 12 +- .../config/auto-relates/return-type.html | 21 +- .../config/extract-all/no-extract-all.html | 9 +- .../no-extract-empty-namespaces.html | 42 +- .../extract-friends/extract-friends.html | 18 +- .../extract-friends/no-extract-friends.html | 18 +- .../base.html | 12 +- .../extract-implicit-specializations.html | 15 +- .../no-extract-implicit-specializations.html | 12 +- .../extract-local-classes.html | 12 +- .../no-extract-local-classes.html | 6 +- .../extract-private-virtual.html | 12 +- .../no-extract-private-virtual.html | 9 +- .../global-symbol-excluded.html | 9 +- .../using-external-base-docs.html | 3 +- .../base-overload-set.html | 24 +- .../copy-dependencies.html | 78 +- .../config/inherit-base-members/copy.html | 129 +- .../impl-defined-base.html | 12 +- .../config/inherit-base-members/never.html | 60 +- .../inherit-base-members/reference.html | 60 +- .../inherit-base-members/see-below-base.html | 18 +- .../inherit-base-members/skip-special.html | 108 +- .../config/legible-names/constructor.html | 24 +- .../config/missing-include-prefixes/main.html | 9 +- .../config/missing-include-shims/main.html | 6 +- .../config/overloads/const-mutable.html | 15 +- .../config/overloads/visibility.html | 42 +- .../golden-tests/config/sfinae/alias.html | 15 +- .../golden-tests/config/sfinae/redeclare.html | 6 +- .../config/sfinae/return-based.html | 6 +- .../show-enum-constants-false.html | 6 +- .../show-enum-constants-true.html | 15 +- .../show-namespaces/show-namespaces.html | 9 +- .../sort-members-by-location.html | 39 +- .../sort-members-by/sort-members-by-name.html | 39 +- .../sort-namespace-members-by-location.html | 99 +- .../sort-namespace-members-by-name.html | 99 +- .../config/sort/sort-members.html | 99 +- .../golden-tests/config/sort/unordered.html | 99 +- .../config/stylesheets/default-inline.html | 14 +- .../config/stylesheets/inline-custom.html | 9 +- .../config/stylesheets/remote-stylesheet.html | 9 +- .../core/canonical-ordering/canonical_1.html | 27 +- test-files/golden-tests/core/empty.html | 3 +- test-files/golden-tests/core/libcxx.html | 6 +- test-files/golden-tests/core/utf-8.html | 6 +- .../filters/file/exclude-self.html | 3 +- .../filters/file/include-self.html | 9 +- .../filters/file/include-symlink.html | 6 +- .../filters/file/subdirectories.html | 6 +- .../filters/file/subdirectories2.html | 6 +- .../filters/symbol-name/blacklist_0.html | 33 +- .../symbol-name/excluded-base-class.html | 36 +- .../symbol-name/excluded-namespace-alias.html | 12 +- .../filters/symbol-name/extraction-mode.html | 78 +- .../symbol-name/impl-defined-member.html | 15 +- .../filters/symbol-name/whitelist_0.html | 54 +- .../symbol-type/nested-private-template.html | 12 +- .../golden-tests/javadoc/brief/brief-1.html | 9 +- .../golden-tests/javadoc/brief/brief-2.html | 21 +- .../golden-tests/javadoc/brief/brief-3.html | 18 +- .../golden-tests/javadoc/brief/brief-4.html | 15 +- .../golden-tests/javadoc/brief/brief-5.html | 21 +- .../golden-tests/javadoc/brief/brief-6.html | 6 +- .../golden-tests/javadoc/code/code.html | 6 +- .../javadoc/copybrief/copybrief.html | 12 +- .../javadoc/copydetails/copydetails.html | 12 +- .../javadoc/copydoc/conversion.html | 27 +- .../javadoc/copydoc/decay-params.html | 18 +- .../javadoc/copydoc/fundamental.html | 18 +- .../javadoc/copydoc/no-param.html | 18 +- .../javadoc/copydoc/operator-param.html | 15 +- .../javadoc/copydoc/param-types.html | 84 +- .../javadoc/copydoc/qualified.html | 60 +- .../javadoc/copydoc/qualifiers.html | 45 +- .../javadoc/copydoc/template-arguments.html | 45 +- .../golden-tests/javadoc/inline/styled.html | 9 +- .../golden-tests/javadoc/link/link.html | 6 +- test-files/golden-tests/javadoc/lists/li.html | 6 +- .../golden-tests/javadoc/lists/listitem.html | 15 +- .../golden-tests/javadoc/paragraph/par-1.html | 15 +- .../javadoc/paragraph/para-1.html | 15 +- .../javadoc/paragraph/para-2.html | 6 +- .../javadoc/paragraph/para-3.html | 6 +- .../golden-tests/javadoc/param/param-1.html | 18 +- .../javadoc/param/param-direction.html | 33 +- .../javadoc/param/param-duplicate.html | 21 +- .../golden-tests/javadoc/param/param.html | 15 +- .../golden-tests/javadoc/pre/pre-post.html | 6 +- .../golden-tests/javadoc/ref/broken-ref.html | 9 +- .../javadoc/ref/parent_context.html | 27 +- .../golden-tests/javadoc/ref/punctuation.html | 12 +- test-files/golden-tests/javadoc/ref/ref.html | 162 +-- .../golden-tests/javadoc/relates/relates.html | 12 +- .../golden-tests/javadoc/returns/returns.html | 18 +- .../golden-tests/javadoc/throw/throw.html | 6 +- .../golden-tests/javadoc/tparam/tparam-1.html | 9 +- .../golden-tests/snippets/distance.html | 3 +- .../golden-tests/snippets/is_prime.html | 3 +- test-files/golden-tests/snippets/sqrt.html | 3 +- .../golden-tests/snippets/terminate.html | 3 +- .../golden-tests/symbols/concept/concept.html | 12 +- .../symbols/concept/requires-clause.html | 24 +- .../golden-tests/symbols/enum/enum.html | 15 +- .../symbols/function/attributes-2.html | 6 +- .../symbols/function/attributes_1.html | 6 +- .../golden-tests/symbols/function/auto.html | 6 +- .../function/explicit-conv-operator.html | 27 +- .../symbols/function/explicit-ctor.html | 75 +- .../function/explicit-object-parameter.html | 15 +- .../symbols/function/function-parm-decay.html | 21 +- .../function/function-template-template.html | 6 +- .../symbols/function/function-template.html | 39 +- .../function/function-tparm-decay.html | 21 +- .../golden-tests/symbols/function/mem-fn.html | 117 +- .../symbols/function/merge-params.html | 6 +- .../symbols/function/merge-tparams.html | 6 +- .../symbols/function/noreturn.html | 15 +- .../symbols/function/overloaded-op-1.html | 9 +- .../symbols/function/overloaded-op-2.html | 9 +- .../symbols/function/pack-expansion.html | 21 +- .../symbols/function/qualified-params.html | 18 +- .../golden-tests/symbols/function/sfinae.html | 57 +- .../spec-mem-implicit-instantiation.html | 93 +- .../symbols/function/type-resolution.html | 153 +- .../symbols/function/variadic-function.html | 18 +- .../symbols/guide/explicit-deduct-guide.html | 18 +- .../namespace-alias/namespace-alias-1.html | 12 +- .../namespace-alias/namespace-alias-2.html | 15 +- .../namespace-alias/namespace-alias-3.html | 15 +- .../symbols/namespace/namespace.html | 54 +- .../symbols/overloads/overloads-brief.html | 72 +- .../symbols/overloads/overloads-metadata.html | 15 +- .../symbols/overloads/overloads-ostream.html | 42 +- .../symbols/overloads/overloads.html | 51 +- .../symbols/record/class-private-alias.html | 9 +- .../record/class-template-partial-spec.html | 15 +- .../symbols/record/class-template-spec.html | 57 +- .../class-template-specializations-1.html | 1242 ++++++----------- .../class-template-specializations-2.html | 72 +- .../class-template-specializations-3.html | 195 +-- .../symbols/record/class-template.html | 69 +- .../symbols/record/conditional-explicit.html | 33 +- .../symbols/record/dtor-overloads.html | 15 +- .../symbols/record/final-class.html | 18 +- .../record/forward-declared-member.html | 9 +- .../symbols/record/friend-duplicate.html | 12 +- .../symbols/record/friend-excluded.html | 12 +- .../symbols/record/friend-fn-has-docs.html | 9 +- .../symbols/record/friend-fn-member.html | 18 +- .../symbols/record/friend-fn-multi-2nd.html | 12 +- .../symbols/record/friend-fn-multi-free.html | 12 +- .../symbols/record/friend-fn-multi.html | 12 +- .../symbols/record/friend-fn.html | 9 +- .../symbols/record/friend-recursive.html | 9 +- .../symbols/record/friend-type.html | 15 +- .../symbols/record/local-class.html | 15 +- .../record/out-of-line-record-def.html | 9 +- .../golden-tests/symbols/record/record-1.html | 30 +- .../symbols/record/record-access.html | 39 +- .../symbols/record/record-data.html | 66 +- .../symbols/record/record-inheritance.html | 51 +- .../template-specialization-inheritance.html | 45 +- .../golden-tests/symbols/record/union.html | 24 +- .../golden-tests/symbols/record/unnamed.html | 24 +- .../symbols/typedef/alias-template.html | 18 +- .../symbols/typedef/decay-to-primary.html | 36 +- .../typedef/dependency-propagation.html | 21 +- .../implicit-instantiation-member-ref.html | 36 +- .../symbols/using-directive/using-1.html | 9 +- .../symbols/using-enum/using-enum-in-ns.html | 12 +- .../using-enum/using-enum-in-record.html | 15 +- .../using/using-alias-template-dependent.html | 24 +- .../symbols/using/using-function-after.html | 18 +- .../using/using-function-and-type.html | 15 +- .../using/using-function-excluded.html | 6 +- .../using/using-function-local-overloads.html | 24 +- .../using/using-function-overloads.html | 21 +- .../symbols/using/using-function.html | 12 +- .../using/using-member-conversion.html | 18 +- .../symbols/using/using-member-function.html | 93 +- .../symbols/using/using-multi.html | 18 +- .../symbols/using/using-struct-template.html | 18 +- .../symbols/using/using-struct.html | 18 +- .../using/using-template-function.html | 12 +- .../symbols/using/using-typename.html | 12 +- .../symbols/variable/no_unique_address.html | 15 +- .../symbols/variable/ns-variables.html | 33 +- .../variable/static-data-def-constexpr.html | 15 +- .../symbols/variable/static-data-def.html | 42 +- .../variable/static-data-template.html | 15 +- .../variable/var-inline-constexpr.html | 33 +- .../symbols/variable/var-template.html | 24 +- .../golden-tests/templates/at_dtst.html | 6 +- .../templates/c_mct_expl_inline.html | 18 +- .../templates/c_mct_expl_outside.html | 18 +- .../templates/c_mft_expl_inline.html | 15 +- .../templates/c_mft_expl_outside.html | 15 +- .../golden-tests/templates/ct_expl.html | 15 +- .../templates/ct_expl_dependency.html | 9 +- test-files/golden-tests/templates/ct_mc.html | 12 +- .../templates/ct_mc_expl_outside.html | 21 +- test-files/golden-tests/templates/ct_mct.html | 12 +- .../templates/ct_mct_expl_inline.html | 18 +- .../templates/ct_mct_expl_outside.html | 24 +- test-files/golden-tests/templates/ct_mf.html | 9 +- .../templates/ct_mf_expl_outside.html | 15 +- test-files/golden-tests/templates/ct_mft.html | 9 +- .../templates/ct_mft_expl_inline.html | 15 +- .../templates/ct_mft_expl_outside.html | 21 +- .../golden-tests/templates/ft_expl.html | 12 +- 228 files changed, 2440 insertions(+), 4851 deletions(-) diff --git a/share/mrdocs/addons/generator/html/layouts/wrapper.html.hbs b/share/mrdocs/addons/generator/html/layouts/wrapper.html.hbs index 0a78a0c2f..71855f5c5 100644 --- a/share/mrdocs/addons/generator/html/layouts/wrapper.html.hbs +++ b/share/mrdocs/addons/generator/html/layouts/wrapper.html.hbs @@ -49,6 +49,11 @@ {{#if page.hasDefaultStyles}}