3"""Immutable data fixtures for the suppression scanner selftest."""
5from __future__
import annotations
9from suppression_tool_selftest
import TOOL_CONTROL_FIXTURES
11EXPECTED_FIXTURE_SHA256 =
"00145bcb1482f63d3811f64bd4d95fd0afdacd684e6127515632d4ebd23c2f54"
12EXPECTED_FIXTURE_INVENTORY_SHA256 = (
13 "d3fea00610180e9fff0dd44cb8d3a8b6f6bcc1e0e97c374ca4cf0e8576c2f26a"
17 "compiler_controls.c":
r"""const char *pragma_text =
18 "#pragma clang diagnostic " "ignored \\"-Wunused-variable\\"";
19const char *attribute_text = "[[maybe_unused]] __attribute__((unused))";
20const char *raw_text = R"tag(RA8_NASA_RULE_3_OK("not code"))tag";
21#pragma clang diagnostic push
22/* Suppression rationale: fixture variable exists only to trigger the warning contract. */
23#pragma clang diagnostic ignored "-Wunused-variable"
24static void clang_region(void) { int fixture_unused; }
25#pragma clang diagnostic pop
26#pragma GCC diagnostic push
27#pragma GCC diagnostic warning "-Wunused-variable"
28#pragma GCC diagnostic pop
29_Pragma("clang diagnostic push")
30/* Suppression rationale: fixture operator variable exists only for warning coverage. */
31_Pragma("clang diagnostic ignored \"-Wunused-variable\"")
32static void clang_operator_region(void) { int fixture_unused; }
33_Pragma("clang diagnostic pop")
34_Pragma("GCC diagnostic push")
35_Pragma("GCC diagnostic warning \"-Wunused-variable\"")
36_Pragma("GCC diagnostic pop")
37[[deprecated("fixture"), maybe_unused]] static int maybe_unused_value;
38[[gnu::unused]] static int scoped_gnu_unused_value;
39__attribute((unused)) static int short_gnu_unused_value;
40__attribute__((unused)) static int gnu_unused_value;
41__attribute__((no_sanitize("undefined"))) int unsanitized_identity(int value) { return value; }
42__attribute__((__no_sanitize__("undefined")))
43int underscored_unsanitized(int value) { return value; }
44__attribute__((__no_sanitize_address__)) int address_unsanitized(int value) { return value; }
45[[clang::no_sanitize("undefined")]] int scoped_unsanitized(int value) { return value; }
46RA8_NASA_RULE_3_OK("fixture host allocator contract")
47static void waived_allocator(void) {}
48void *allowed_alloc(void) { return malloc(4); /* alloc-allow: fixture bounded allocator */ }
50 "malformed_controls.c":
r"""#pragma clang diagnostic ignored "-Wunused-variable"
51#pragma GCC diagnostic sideways "-Wunused-variable"
52#pragma GCC diagnostic push
53#pragma clang diagnostic pop
54_Pragma("clang diagnostic ignored -Wunused-variable")
55[[maybe_unused("reason")]] static int malformed_maybe_args;
56[[maybe_unused bogus]] static int malformed_maybe_tail;
57[[clang::no_sanitize(foo)]] int malformed_scoped_sanitizer(int value) { return value; }
58__attribute__((unused extra)) static int malformed_gnu;
59__attribute__((unused("reason"))) static int malformed_unused;
60__attribute__((no_sanitize)) int malformed_empty_sanitizer(int value) { return value; }
61__attribute__((no_sanitize(foo))) int malformed_sanitizer(int value) { return value; }
63static void bare_nasa(void) {}
64static int orphan_control; /* alloc-allow: no allocator on this line */
65static int bare_control; /* alloc-allow */
67 "alloc_consumer.c":
r"""void *malloc(unsigned long size);
68void *reasoned(void) { return malloc(4); /* alloc-allow: fixture bounded allocation */ }
69void *string_only(void) { const char *text = "alloc-allow: not a comment"; return malloc(4); }
70void orphan_control(void) { /* alloc-allow: no allocation is present */ }
72 "alloc_consumer.cpp":
r"""void active_new(void) {
73 int *value = new int; /* alloc-allow: fixture C++ object allocation */
74 delete value; /* alloc-allow: fixture C++ object release */
76void orphan_cpp_control(void) { /* alloc-allow: no allocation is present */ }
81# Synthetic check proves source-located global exclusions.
87 "controls.py":
"""import pytest
90from unittest import expectedFailure, skipIf, skipUnless
92@pytest.mark.skip(reason="fixture platform is absent")
93@pytest.mark.skipif(True, reason="fixture condition")
94@pytest.mark.xfail(reason="fixture defect", strict=True)
96 pytest.skip("fixture runtime precondition")
97 pytest.xfail("fixture runtime limitation")
99@unittest.skip("fixture feature unavailable")
100def test_unittest_controlled():
101 raise unittest.SkipTest("fixture setup unavailable")
103pytestmark = pt.mark.skip(reason="fixture module platform is absent")
105@skipIf(True, "fixture skipIf condition")
109@skipUnless(False, "fixture skipUnless condition")
110def test_skip_unless():
114def test_expected_failure():
117class FixtureCase(unittest.TestCase):
118 def test_method_skip(self):
119 self.skipTest("fixture method setup unavailable")
121@pt.mark.xfail(reason="fixture permissive expected failure")
122def test_permissive_xfail():
125text = "pytest.mark.skip(reason='string only')"
127 "sample.py":
"""value = "# noqa: F401 -- string only"
128controls = "# pragma: no cover; # pylint: disable=unused-import; # fmt: off"
129import os # noqa: F401 -- imported for fixture coverage
130result = value # type: ignore[assignment] -- fixture type mismatch
131print(result) # noqa: S603,S607 -- fixture normalized multi-rule waiver
132# pragma: no cover -- fixture impossible branch
133# pylint: disable=unused-import -- fixture analyzer region
134# pylint: enable=unused-import
135# mypy: ignore-errors -- fixture generated API surface
136other = result # pyright: ignore[reportAssignmentType] -- fixture mismatch
137print(other) # nosec B101 -- fixture security false positive
138print(other) # bandit: skip=B602 -- fixture security false positive
139# ruff: noqa: E402 -- fixture file-level import ordering
140# Suppression rationale: hand-aligned fixture table
145 "bare_python_controls.py":
"""# fmt: off
150 "sample.c":
"""const char *text = "NOLINT(readability-magic-numbers)";
151const char *raw = R"tag(// NOLINT(readability-magic-numbers))tag";
152const char *spliced = "text \\
153// NOLINT(readability-magic-numbers)";
154int NOLINT(raw_token);
156// NOLINTNEXTLINE(readability-magic-numbers) -- fixture literal
158/* GCOVR_EXCL_LINE -- fixture hardware path */
159/* cppcheck-suppress unreadVariable -- fixture assembly output */
160/* NOLINTBEGIN(readability-identifier-naming) -- fixture generated names */
162/* NOLINTEND(readability-identifier-naming) */
163// NOLINT(whitespace/line_length) -- fixture vendored cpplint syntax
164// spliced line comment \\
165NOLINT(readability-redundant-string-init) -- fixture spliced directive
166// spliced line comment \\
167int NOLINT(raw_spliced_token);
168/* GCOVR_EXCL_START -- fixture unreachable region */
169int unreachable_value;
171/* cppcheck-suppress-begin unusedStructMember -- fixture generated declarations */
173/* cppcheck-suppress-end unusedStructMember */
174unsigned long first_set_bit; // NOLINT (runtime/int)
175int legacy_size; // NOLINT[readability/fn_size]
176/* GCOVR_EXCL_BR_START -- fixture branch-only region */
177if (unreachable_value) {
178 unreachable_value = 2;
180/* GCOVR_EXCL_BR_STOP */
181/* LCOV_EXCL_START -- fixture LCOV region */
182unreachable_value = 3;
184/* mcdc-deactivated: fixture operands are coupled by the fixture contract. */
185int fixture_decision = fixture_left && fixture_right;
187 "malformed_mcdc.c":
"""/**
188 * mcdc-deactivated: documentation prose is not an active marker.
190/* mcdc-deactivated because the colon is missing */
191/* mcdc-deactivated: first marker for one decision */
192/* mcdc-deactivated: duplicate marker for the same decision */
193int duplicate_decision = fixture_left || fixture_right;
194RA8_MCDC_DEACTIVATED("fixture function invariant")
195RA8_MCDC_OK("unknown alias")
196RA8_MCDC_DEACTIVATED(reason)
197RA8_MCDC_DEACTIVATED(not_literal) RA8_MCDC_DEACTIVATED("valid after invalid")
198RA8_MCDC_DEACTIVATED("valid before invalid") RA8_MCDC_DEACTIVATED(still_not_literal)
199RA8_MCDC_DEACTIVATED("first distinct reason") RA8_MCDC_DEACTIVATED("second distinct reason")
200/* mcdc-deactivated: no following compound decision */
203 "native_test.cpp":
"""void skip_gtest(void) {
204 GTEST_SKIP() << "fixture platform is absent";
206void skip_unity_message(void) {
207 TEST_IGNORE_MESSAGE("fixture peripheral is absent");
209void skip_unity_bare(void) {
212const char* skip_text = "GTEST_SKIP()";
213void malformed_skip(void) { GTEST_SKIP(7); }
214void malformed_unity(void) { TEST_IGNORE_MESSAGE(reason); }
216 "sample.sh":
"""#!/usr/bin/env bash
217echo '# shellcheck disable=SC2086'
218# shellcheck disable=SC2086 # fixture intentionally expands words
219true;# shellcheck disable=SC2034 # fixture operator starts a comment word
220value=${value#prefix}; cc -Wno-shadow -c sample.c
221word#literal cc -Wno-conversion -c sample.c
222cc -Wno-unused-parameter -c sample.c
223cmake -S . -B build \\
225"$CMAKE" -S . -B variable-build \\
227FLAGS=(-DUNIT_TEST -w)
230echo "-Wno-error is documentation"
231cmake -E echo -Wno-dev
232/usr/bin/cmake -S . -B absolute-build -Wno-dev
233/usr/bin/clang++ -Wno-sign-conversion -c sample.cpp
234echo "/usr/bin/clang++ -Wno-error is quoted documentation"
235"/usr/bin/cmake" -S . -B quoted-build -Wno-dev
236'/usr/bin/clang++' -Wno-float-conversion -c sample.cpp
237cmake -E env /usr/bin/clang++ -Wno-padded -c sample.cpp
238cmake --build build --target -Wno-dev
239"/opt/tool chain/bin/clang++" -Wno-error -c spaced.cpp
240"/opt/cmake tools/bin/cmake" -S . -B spaced-build -Wno-dev
241/opt/tool\\ chain/bin/clang++ -Wno-shadow -c escaped.cpp
242"/opt/tool \\\"quoted\\\" path/bin/clang++" -Wno-padded -c quoted.cpp
243"/opt/tool\\\\path/bin/clang++" -Wno-switch -c backslash.cpp
244'/opt/single quoted/bin/clang' -Wno-cast-align -c single.c
245echo '"/opt/tool chain/bin/clang++" -Wno-unused-variable'
246printf '%s\\n' "/opt/cmake tools/bin/cmake" -Wno-dev
247# "/opt/tool chain/bin/clang++" -Wno-comment
248"/opt/cmake tools/bin/cmake" -S . -B deprecated -Wno-deprecated
249"/opt/cmake tools/bin/cmake" -S . -B dev-errors -Wno-error=dev
250"/opt/cmake tools/bin/cmake" -S . -B deprecated-errors -Wno-error=deprecated
251"/opt/tool chain/bin/clang++" -Wno-deprecated -c compiler-owned.cpp
252"/opt/cmake tools/bin/cmake" -S . -B flags -DCMAKE_C_FLAGS=-Wno-deprecated
253echo '"/opt/cmake tools/bin/cmake" -Wno-deprecated'
254printf '%s\\n' "/opt/cmake tools/bin/cmake" -Wno-error=dev
255# "/opt/cmake tools/bin/cmake" -Wno-error=deprecated
257# shellcheck disable=SC2016
258cc -Wno-error -c hidden.c
260printf '%s\n' '<<PAYLOAD'
261read -r payload <<<$value
263# shellcheck disable=SC2015 # active after quoted heredoc lookalike
265# shellcheck disable=SC2014
268# shellcheck disable=SC2013
270single='multiline text
271# shellcheck disable=SC2012
273double="multiline text
274# shellcheck disable=SC2011
276# shellcheck disable=SC2010 # active after multiline quotes
277# shellcheck enable=SC2010
278# shellcheck source=/dev/null
279# shellcheck source-path=SCRIPTDIR
280# shellcheck shell=bash
281# shellcheck external-sources=true
282SHELLCHECK_OPTS='--exclude=SC2001,SC2002' # fixture central exclusions need stable rows
283printf '%s\n' 'SHELLCHECK_OPTS=--exclude=SC2999'
284probe || true # fixture cleanup status is intentionally ignored
285captured="$(probe || true)"
290printf '%s\n' 'probe || true'
292gcovr --exclude-unreachable-branches # fixture strips compiler-generated dead edges
293coverage_text='--exclude-unreachable-branches'
294gcovr --gcov-ignore-parse-errors=suspicious_hits.warn
299# shellcheck disable=SC2009
301 "config/gcovr.cfg":
"""gcov-ignore-parse-errors = negative_hits.warn # fixture diagnostic
302exclude-unreachable-branches = yes # fixture removes compiler-only edges
303exclude-throw-branches = false # fixture keeps source branches
304gcov-ignore-parse-errors = all # duplicate authority must fail
306 "invalid/gcovr.cfg":
"""exclude-throw-branches = sideways # invalid boolean must fail
308 ".shellcheckrc":
"""# fixture editor parity
309exclude=SC2003,SC2004 # fixture central exclusions need stable rows
311 "just/sample.just":
"""set shell := ["bash", "-euo", "pipefail", "-c"]
315 value="$(probe || true)"
317 "CMakeLists.txt":
"""target_compile_options(sample PRIVATE -w -Wno-unused-variable)
318target_compile_options(sample PRIVATE -Wno-dev)
319execute_process(COMMAND ${CMAKE_COMMAND} -S . -B build -DOPTION=ON -Wno-dev)
320message(STATUS "-Wno-dev is data")
321set(PAYLOAD "-Wno-dev")
322execute_process(COMMAND ${CMAKE_COMMAND} -S . -B deprecated -Wno-deprecated)
323set(CMAKE_C_FLAGS "-Wno-deprecated")
324message(STATUS "/usr/bin/cmake -S . -B hidden -Wno-deprecated")
328# Fixture negative tests intentionally return non-zero.
329set_tests_properties(fails PROPERTIES WILL_FAIL TRUE)
330# Fixture is registered but cannot execute on this platform.
331set_property(TEST platform PROPERTY DISABLED ON)
332# Fixture maps one intentional application status to a skipped result.
333set_tests_properties(status PROPERTIES SKIP_RETURN_CODE 77)
334get_property(not_a_control TEST platform PROPERTY DISABLED)
335message("set_tests_properties(fake PROPERTIES WILL_FAIL TRUE)")
337# NOLINT(readability-magic-numbers)
341# shellcheck disable=SC2016
344# -Wno-error in a comment is not active
346 "Makefile":
"""WARNING_CFLAGS ?= -Wno-format-nonliteral
347ECHO_TEXT = -Wno-error
349 "sample.yml":
"""payload: |
350 # noqa: command-instead-of-shell
351 cc -Wno-error -c hidden.c
353 cc -Wno-error -c visible.c
354 cmake -S . -B build \\
358 clang++ -Wno-dev -c visible.cpp
361 /usr/bin/cmake -S . -B folded
365 -Wno-conversion -c folded.cpp
366task: value # noqa: command-instead-of-shell
369 probe || true # fixture generated wrapper tolerates an absent probe
377ansible.builtin.shell: |
381 # shellcheck disable=SC2016
383pkg.cflags: -Wno-dev -Wno-array-bounds -w
386 cmake -S . -B commented
387 # The folded shell comment owns the rest of this paragraph.
390 ".github/workflows/control.yml":
"""---
394 continue-on-error: false
396 - name: Optional diagnostic
397 continue-on-error: true
399 - name: Optional artefact
400 uses: actions/upload-artifact@v4
402 if-no-files-found: warn
403 - name: Expected-empty artefact
404 uses: actions/upload-artifact@v4
406 if-no-files-found: ignore
408 "infra/ansible/roles/fixture/tasks/main.yml":
"""---
409- name: Read-only fixture probe
410 ansible.builtin.command: {cmd: probe}
413- name: Protect fixture credential output
414 ansible.builtin.command: {cmd: credential}
416- name: Continue fixture cleanup after an absent resource
417 ansible.builtin.command: {cmd: cleanup}
419- name: Keep directive-looking block payload inert
420 ansible.builtin.debug:
424 "windows.yml":
"""steps:
427 if (($value -eq 1) -and ($other -eq 2)) {
428 Write-Output "PowerShell is not parsed as malformed Bash"
431 "policy.md":
"""A prose NOLINT mention is not a directive.
432<!-- AI-OK: fixture policy quotation -->
435AI-OK: multiline fixture policy quotation
437<!-- FUTURE-OK: uncataloged policy marker -->
439<!-- AI-OK: fenced example only -->
441`<!-- AI-OK: inline example only -->`
442<!-- unterminated fixture marker
444 "malformed.py":
"""value = 1 # noqa: F401 E402
445# pragma: no cover because fixture
447# mypy: disable-error-code
451# ruff: noqa: E402 F401
453 "unmatched.c":
"""// NOLINTEND(readability-magic-numbers)
455/* GCOVR_EXCL_BR_START -- mismatched branch region */
457/* LCOV_EXCL_START -- mismatched tool region */
459// clang-format off sideways
461 "unterminated.c":
"// trailing line splice \\\\\n",
462 "malformed.sh":
"""#!/usr/bin/env bash
464# shellcheck disable=SC2008 # remains visible after malformed operator
466 "unterminated.sh":
"""#!/usr/bin/env bash
469 "port/threadx/vendor.c":
"// NOLINT(readability-magic-numbers) -- vendor C\n",
470 "port/threadx/CMakeLists.txt":
"# NOLINT(readability-magic-numbers) -- owned glue\n",
471 "libs/ra8_c6link/src/ra8_media_download.pb-c.c": (
472 "// NOLINT(readability-magic-numbers) -- generated fixture\n"
474 ".cppcheck-suppressions":
"""# ----------------------------------------
475# Fixture grouped rules.
476# Justification: paired divider rationale.
477# ----------------------------------------
478unusedFunction:sample.c
479unusedFunction:sample.c
480# Justification: adjacent local rationale A.
481unreadVariable:sample.c
482# Justification: adjacent local rationale B.
486 "pyproject.toml":
"""[tool.ruff]
488 "generated", # generated fixture output
493 "COM812", # formatter owns trailing commas
496[tool.ruff.lint.per-file-ignores]
497"fixture.py" = ["SLF001"] # third-party fixture internals lack a public seam
499 "apps/fixture/src/format_controls.c":
r"""
500const char *text = "clang-format off; @cond hidden; IWYU pragma: keep";
501// Suppression rationale: fixture columns encode a protocol table reviewed by row.
503int columns[] = {1, 2};
505/** Suppression rationale: the fixture hides a private implementation-only contract. */
507int internal_contract;
509// Suppression rationale: the fixture include provides a required macro side effect.
510#include "fixture_keep.h" // IWYU pragma: keep
511// Suppression rationale: the fixture include intentionally re-exports its API.
512#include "fixture_export_one.h" // IWYU pragma: export
513// Suppression rationale: these fixture includes form one exported facade.
514// IWYU pragma: begin_exports
515#include "fixture_export.h"
516// IWYU pragma: end_exports
517// Suppression rationale: these includes are required by generated registration.
518// IWYU pragma: begin_keep
519#include "fixture_registration.h"
520// IWYU pragma: end_keep
521// Suppression rationale: this fixture is an implementation-only header.
522// IWYU pragma: private
523// Suppression rationale: consumers must include the public fixture facade.
524// IWYU pragma: private, include "fixture_public.h"
525// Suppression rationale: the generated fixture peer is an intentional friend.
526// IWYU pragma: friend "fixture_peer\\.h"
527// Suppression rationale: the platform header is provided transitively.
528// IWYU pragma: no_include <platform_fixture.h>
529// Suppression rationale: the opaque fixture type must stay complete.
530// IWYU pragma: no_forward_declare "struct fixture_type"
531// Suppression rationale: the nonstandard fixture name has this associated header.
532#include "fixture_associated.h" // IWYU pragma: associated
533// Suppression rationale: consumers always require this registration header.
534// IWYU pragma: always_keep
536 "apps/fixture/src/wrong_controls.c":
r"""// Clang-format off
537// clang-format off -- unsupported suffix
539// IWYU pragma: no_include platform_fixture.h
541// markdownlint-disable MD013
543 "apps/fixture/src/clang_colon_control.c":
r"""
544// clang-format off: the fixture probes clang-format's supported colon rationale.
545int columns[] = {1, 2};
548 "apps/fixture/src/clang_empty_colon_control.c":
r"""// clang-format off:
549int preserved[] = {1, 2};
551int reformatted[] = {1, 2};
553 "apps/fixture/src/unmatched_controls.c":
r"""// clang-format on
554// IWYU pragma: end_keep
557 "format_controls.yml":
"""---
559 # yamllint disable-line rule:line-length
560# Suppression rationale: the fixture block intentionally demonstrates two noisy rules.
561# yamllint disable rule:line-length rule:comments
562url: https://example.invalid/an-intentionally-long-fixture-resource-locator
563# yamllint enable rule:comments rule:line-length
564# Suppression rationale: the signed URL cannot be wrapped or carry trailing whitespace edits.
565# yamllint disable-line rule:line-length rule:trailing-spaces
566signed_url: https://example.invalid/an-intentionally-long-fixture-resource-locator
568 "disable_file.yml":
"""# yamllint disable-file
569fixture: deliberately broad
571 "wrong_format_controls.yml":
"""---
572# YAMLLINT disable-line rule:line-length
573# yamllint disable-line rule:line-length,rule:comments
574# yamllint disable-file
575fixture: malformed controls
577 "unmatched_format_controls.yml":
"""---
578# yamllint enable rule:line-length
579fixture: unmatched enable
581 "Dockerfile":
"""# Fixture prose mentions hadolint without controlling it.
583# hadolint ignore = DL3003 , SC2164 # The fixture combines Docker and shell findings.
586 "Dockerfile.hadolint-active":
"""FROM scratch
589 "Dockerfile.global":
"""# Suppression rationale: this generated fixture has no package index.
590# hadolint global ignore = DL3008 , SC1091
593 "Dockerfile.bad":
"""# Hadolint ignore=DL3008
594# hadolint ignore=DL3008 -- unsupported suffix
595# hadolint ignore=dl3008
596# hadolint ignore=DL3008 ,
599 "format_controls.cmake":
"""set(text "cmake-lint: disable=R0912")
600# Suppression rationale: the fixture function is a declarative feature matrix.
601# cmake-lint: disable=R0912,R0915 disable=C0103
602# cmake-format: off -- the fixture table is compared byte-for-byte in source form.
605# Suppression rationale: the short spelling protects a second literal table.
607set(second_matrix three four)
610 "cmake_lint_space.cmake":
"""# Suppression rationale: whitespace exposes pragma behavior.
611# cmake-lint: \tdisable=R0912\tdisable=C0103
615 "cmake_lint_tab.cmake":
"""# Suppression rationale: tabs do not match the prefix.
616# cmake-lint: disable=C0103
620 "wrong_format_controls.cmake":
"""# CMake-format: off
622# cmake-lint: enable=R0912
625 "unmatched_format_controls.cmake":
"""
626# Suppression rationale: unmatched fixture proves region validation.
630 "docs/format_controls.md":
"""`<!-- prettier-ignore -->`
632<!-- markdownlint-disable MD013 -->
634<!-- Suppression rationale: the fixture table is compared byte-for-byte. -->
635<!-- prettier-ignore -->
636<table><tr><td>fixture</td></tr></table>
637<!-- Suppression rationale: the fixture URL is intentionally indivisible. -->
638<!-- markdownlint-disable MD013 -->
639https://example.invalid/an-intentionally-long-fixture-resource-locator
640<!-- Suppression rationale: this one line contains a generated indivisible token. -->
641<!-- markdownlint-disable-line MD013 -->
642<!-- Suppression rationale: the next generated line contains an indivisible token. -->
643<!-- markdownlint-disable-next-line MD013 -->
645<!-- markdownlint-capture -->
646<!-- Suppression rationale: the captured fixture contains generated HTML. -->
647<!-- markdownlint-disable MD033 -->
648<!-- Suppression rationale: the nested generated URL intentionally remains bare. -->
649<!-- markdownlint-disable MD034 -->
650<span>generated section</span>
651https://example.invalid/generated
652<!-- markdownlint-restore -->
653<!-- markdownlint-enable MD013 -->
654<!-- Suppression rationale: generated front matter controls the whole fixture file. -->
655<!-- markdownlint-disable-file MD041 -->
656<!-- markdownlint-enable-file MD041 -->
657<!-- @cond HTML_COMMENT_INACTIVE -->
660@cond MULTILINE_HTML_COMMENT_INACTIVE
663<!-- Suppression rationale: the docs fixture hides an internal-only section. -->
664@cond MARKDOWN_INTERNAL
668 "docs/format_controls.dox":
r"""
669/** Suppression rationale: the dox fixture hides an internal-only section. */
674 "libs/third_party/vendor/include/vendor_docs.h":
"""/** @cond VENDOR_INTERNAL */
678 "docs/wrong_format_controls.md":
"""<!-- Prettier-ignore -->
679<!-- prettier-ignore -- unsupported suffix -->
680<!-- Markdownlint-disable MD013 -->
681<!-- markdownlint-disable MD013,MD033 -->
682<!-- markdownlint-capture MD013 -->
683<!-- markdownlint-restore MD013 -->
684<!-- markdownlint-configure-file { "MD013": FALSE } -->
685<!-- markdownlint-configure-file { "MD013": 100 } -->
688 "docs/unmatched_format_controls.dox":
"@endcond\n",
689 "scripts/checks/suppression_selftest.py":
"""
690# Suppression rationale: Python docs hide an internal helper.
691## @cond PYTHON_INTERNAL
695 "scripts/checks/suppression_scan.py":
"""# @cond single_hash_is_not_doxygen
698 "generated/ignored.sh":
"""#!/bin/sh
703 "generated/mixed-case.sh":
"""#!/bin/sh
708 "generated/false.sh":
"""#!/bin/sh
713 "generated/unset.sh":
"""#!/bin/sh
718 "bad/generated/uppercase-value.sh":
"""#!/bin/sh
723 ".prettierrc.json":
"{}\n",
724 ".markdownlint.json":
"{}\n",
725 ".editorconfig":
"""root = true
728# Generated shell fixtures are byte-for-byte protocol inputs.
731[generated/mixed-case.sh]
732# This mixed-case property proves EditorConfig names are case-insensitive.
741 "bad/.editorconfig":
"""root = true
749 ".yamllint.yaml":
"""---
752 # Fixture keys reproduce GitHub Actions' YAML 1.1 `on` requirement.
755 # The fixture prose checker deliberately owns comment indentation.
756 comments-indentation: false
758 ".hadolint.yaml":
"""---
759failure-threshold: style
761 # Fixture packages resolve from a rotating archive without stable versions.
764 ".github/tidy-baseline.txt":
"""# Fixture burn-down baseline.
765sample.c\treadability-function-size\t1
766sample.c\treadability-function-size\t1
769 ".github/cite-baseline.txt":
"""# Total at this baseline: 1 uncited access
772 ".github/mcdc-baseline.txt":
"""0
774 ".github/rogue-baseline.txt":
"""unexpected
778FIXTURES = CORE_FIXTURES | TOOL_CONTROL_FIXTURES
781def fixture_digest(fixtures: dict[str, str]) -> str:
782 """Return the length-framed digest used to authenticate fixture transport."""
783 digest = hashlib.sha256()
784 for rel, body
in sorted(fixtures.items()):
785 for data
in (rel.encode(), body.encode()):
786 digest.update(len(data).to_bytes(8,
"big"))
788 return digest.hexdigest()