Skip to content

The diff rule's fix suggests a marker that also keeps the column out of the inventory - #24

Merged
avison9 merged 1 commit into
mainfrom
fix/diff-hint-names-both-rules
Nov 14, 2026
Merged

avison9 merged 1 commit into
mainfrom
fix/diff-hint-names-both-rules

Conversation

@avison9

@avison9 avison9 commented Nov 14, 2026

Copy link
Copy Markdown
Owner

What changes

The fix line of schema-before-connector now suggests:

-- cdclint:ignore schema-before-connector,source-column-not-captured: <why>

It used to name only schema-before-connector. That rule only judges a change, so after the merge the column came back as source-column-not-captured on every run, which put a deliberate exclusion back in the inventory of undecided columns. RefuseRadar's script had copied the old hint, and the review of avison9/refuseradar#1142 caught it.

Corpus

  • Six expected.txt files change by exactly the hint text. I edited them by hand first, and those six entries failed before the code changed.
  • New ignore-marker-both-rules, with a base: the hinted marker is acknowledged in the pull request, and the second rule is not reported as covering nothing.
  • New ignore-marker-both-rules-merged, no base: the same migration after the merge stays out of the inventory, acknowledged as source-column-not-captured.
  • Both new entries already passed before the code change. They pin down that the marker the hint now suggests works at both moments.
  • The README example, its explanation, and the internal/ignore package doc use the two-rule marker.

Verified

  • gofmt -l . is clean, and go vet, go build and go test ./... pass (Docker, golang:1.25-bookworm).
  • RefuseRadar at origin/main: 0 error(s), 0 warning(s), 162 info, unchanged.
  • A probe column on reports gets the new hint. Pasting the hinted marker gives an acknowledgement and no warnings.

Rejected

A warning for a marker that names only the diff rule. In the pull request that marker is a valid decision, and nothing tells "only for now" apart from a mistake. The hint is where authors copy from, so that is what this changes.

…of the inventory

schema-before-connector told an author leaving a column out on purpose to
write `-- cdclint:ignore schema-before-connector: <why>`. That marker works
in the pull request and stops working at the merge: the rule only judges
a change, and after the merge the same column is source-column-not-captured
on every run, back in the inventory of columns nobody decided about.
RefuseRadar's pinned script copied the hint into its own example and a
review of #1142 there caught it. The fix now names both rules.

Two corpus entries show the suggested marker working at both moments:
ignore-marker-both-rules (with a base: acknowledged, and the second rule is
not reported as covering nothing) and ignore-marker-both-rules-merged (no
base: acknowledged as source-column-not-captured). Six expectations change
by exactly the hint text. The README and the ignore package's example use
the two-rule marker.

Rejected: a warning for a marker that names only the diff rule. In the
pull request it is a valid decision, and nothing distinguishes "only for
now" from a mistake; the hint is where the author copies from.
@avison9 avison9 self-assigned this Nov 14, 2026
@avison9
avison9 merged commit 3bb7304 into main Nov 14, 2026
2 checks passed
@avison9
avison9 deleted the fix/diff-hint-names-both-rules branch November 14, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant