Conversation
…what it left out
A repository that has read its inventory of uncaptured columns does not
want it on every run: RefuseRadar prints 161 source-column-not-captured
lines and set 2026-10-21 to decide whether they stay. --disable RULE
(comma-separated or repeated) drops a rule's findings from the output
and from the exit code.
A filter must not make a run look cleaner than it was, so the text
output ends with what was left out ("not shown (--disable):
source-column-not-captured 161"), a run whose every finding was hidden
says "ok: nothing to report outside the disabled rules" rather than
that the files agree, and --format json keeps its array shape and puts
the same note on stderr. An unknown rule name is an error listing the
rules, not a filter that silently hides nothing; engine.Rules is that
list, and the corpus test fails if any finding's rule is missing from
it.
Disabling schema-before-connector skips the base altogether, as if
--base were not given. Filtering its findings afterwards would also
lose the columns it raised, because source-column-not-captured leaves
raised columns out of its inventory, so they would appear nowhere.
The action gains a disable input. run() now takes its output streams,
so the tests drive the real command line: hiding a rule, a disabled
error no longer failing the run, commas and repeats, an unknown name,
the base skipped, and JSON's stderr note.
…TER's In a multi-line ALTER TABLE every added column was positioned at the statement's first line, so three columns added by one migration were reported at the same line (RefuseRadar #963's three reports columns all at :6). The readers parse actions with their whitespace folded, so an action cannot be found in the file verbatim; each added column's name is now searched for in the statement text, as a whole word, after the table's name and after the previous action, and the column takes that line. When the name cannot be found the statement's line stays, as before. This is also what lets a marker on the line that adds a column refer to that column's finding. Two corpus entries change, line numbers only: diff-connector-captures- one-of-two (:5 to :7, movement_cleared_by's own line) and diff-connector-touched-other-table (three findings at :6 become :7, :8, :9, now in file order instead of message order). Every message is unchanged.
…sion, so the finding stops failing the run
Leaving a PII column off the include list is right, and the diff rule
raises it all the same: RefuseRadar keeps its PR gate at --fail-on
error because at warning such a pull request could not merge, and so a
forgotten column does not block either. A per-rule filter cannot tell
the two apart. The decision has to be recorded against the column:
ADD COLUMN ssn_hash TEXT, -- cdclint:ignore schema-before-connector: PII, never streamed
A marker names one or more rules and a reason. After code it covers its
own line; alone on a line it covers the line below. The trailing case
must not reach further: writing this entry's expectation by hand showed
that "this line or the next" made the ssn_hash marker also acknowledge
nickname on the next line, the forgotten column the gate exists for.
The reason is required, since it is the record. A marker with no
reason, naming a rule that does not exist, or covering no finding is an
ignore-marker warning. A schema-before-connector marker is never called
unused: that rule judges the change, so the marker goes quiet once its
pull request merges; neither is a marker for a rule that did not run.
Acknowledged findings do not count for the exit code and are listed
with their reason; --format json keeps its array and notes them on
stderr, as --disable does. The diff rule's fix now points at the marker
instead of "let this warning stand". The corpus test runs through the
same lint() path as the command line.
Proven on RefuseRadar with the probe pattern: a column added to reports,
--base origin/main --fail-on warning: exit 1 without a marker, exit 0
with one, the reason printed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it changes
Leaving a PII column off the include list is right, and
schema-before-connectorraises it all the same. So RefuseRadar keeps its PR gate at--fail-on error, and a forgotten column does not block either. A per-rule filter (#19) cannot tell the two apart; the decision has to be recorded against the column, where the pull request that makes it shows it:The
ssn_hashfinding stops failing the run and is listed with its reason;nicknameis still raised.Proven on RefuseRadar
The probe pattern (a column added to
reportsin a temporary migration, removed afterwards), with the gate RefuseRadar wants:The rules of a marker
ignore-marker-pii's expectation by hand caught the first version, "this line or the next", acknowledgingnicknamethrough thessn_hashmarker: the forgotten column the gate exists for.--or MySQL's#; in migrations and sink DDL (down migrations skipped).ignore-marker, inengine.Rulesso it can be--disabled): no reason, a rule name that does not exist, or a marker covering no finding.schema-before-connector: that rule judges the change, so its marker goes quiet once the pull request merges; nor for a rule that did not run (no--base, or disabled). The README shows naming both rules to keep the column out of the inventory afterwards.--disabledoes. When everything was acknowledged or disabled, the output says so rather than that the files agree.Verified
ignore-marker-pii(the diff rule, one column acknowledged and one raised) andignore-marker-mistakes(no reason, an unknown rule, a stale marker, and a marker on the line above a finding). The corpus test now runs through the samelint()as the command line.internal/ignoretests: both comment styles, a colon-less marker has no reason, down files not scanned, trailing vs standalone scope, and which unused markers are reported.gofmt -l .clean,go vet,go test ./...pass; RefuseRadar as above.Merging
Stacked on #20, which is on #19. Merge #19, #20, then this. After a release, RefuseRadar's
tools/cdclint.shcan move the PR gate to--fail-on warning, as its own comment asks.