From 0cbb120290baf3739900fabca626d977168f13af Mon Sep 17 00:00:00 2001 From: Scott McCarty Date: Wed, 18 Nov 2026 07:11:18 +0000 Subject: [PATCH] fix: narrow gourmand exception for a finding a pattern entry used to hide (a271) Gourmand is about to honour `pattern` on exceptions (crunchtools/gourmand#43). Until now the existing entry on this file suppressed every finding of its check; this adds an item-scoped entry for the one finding it was hiding. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01R7Y1jgC5WYMYiuEavEkLHa --- CHANGELOG.md | 6 ++++++ gourmand-exceptions.toml | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d21623a..0d7c710 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ All notable changes to this project are documented here. The format follows ## [Unreleased] +### Fixed +- A narrow `copy_paste_detection` exception for `enqueue._build_parser`, which + duplicates `follow._build_parser` in shape only. The `parse_status` entry + covered it only because Gourmand ignored `pattern` and suppressed the whole + file; Gourmand is about to honour `pattern` (crunchtools/gourmand#43). + ## [0.10.2] - 2026-11-16 ### Fixed diff --git a/gourmand-exceptions.toml b/gourmand-exceptions.toml index 66066f4..734e729 100644 --- a/gourmand-exceptions.toml +++ b/gourmand-exceptions.toml @@ -58,6 +58,13 @@ pattern = "parse_status" justification = "parse_status parses grype's key=value cve.status format; rt._parse_fields parses RT's key: value show format with continuation lines -- different wire formats for different systems; the shared shape is a line loop, and merging would couple the scanner's format to RT's" classification = "gourmand_bug" +[[exceptions]] +check = "copy_paste_detection" +path = "src/deployer/enqueue.py" +item = "_build_parser" +justification = "enqueue._build_parser and follow._build_parser build the argparse parsers of two different programs (cve-enqueue, release-follow) with different flags; the matching statements are argparse's construct/add_argument/return shape, and a shared builder would couple two CLIs that change independently" +classification = "by_design" + # An environment file's values ARE paths. The two the rule objects to are # `DEPLOYER_STATE` and `PODMAN_SOCKET`, and their values are the deployment # facts the example exists to show someone setting up a second one. Naming them