Skip to content

refactor: remove enum variants nothing constructs - #1308

Merged
kvlonge merged 2 commits into
mainfrom
chore/remove-unconstructed-variants
Nov 5, 2026
Merged

kvlonge merged 2 commits into
mainfrom
chore/remove-unconstructed-variants

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Why

The new unconstructed-variant rule (XSB077) reports three enum variants on main that nothing constructs or matches: ConfigErrorKind::Missing, ConfigErrorKind::InvalidField and SqlFileRole::Yaml. The config reader stopped producing the first two when the native reader took over, and no discovered-file group has a YAML role.

Changes

  • Remove Missing and InvalidField from ConfigErrorKind. The only match on it handles Unsupported and routes every other kind through one arm.
  • Remove Yaml from SqlFileRole. The role is built only from Rust-side file groups and is never deserialized, so no input can name it.

Verification

  • cargo test -p sqlbuild-config -p sqlbuild-refactor: passes.
  • fensu check reports no XSB077 warnings on this branch.
  • make check-ci passes.

ConfigErrorKind::Missing and ::InvalidField and SqlFileRole::Yaml are
never constructed or matched; XSB077 reported them.
@kvlonge
kvlonge enabled auto-merge (squash) November 5, 2026 06:03
@kvlonge
kvlonge merged commit f6bc70e into main Nov 5, 2026
84 of 86 checks passed
@kvlonge
kvlonge deleted the chore/remove-unconstructed-variants branch November 5, 2026 07:45
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