Skip to content

refactor: remove enum variants nothing constructs - #1308

Open
kvlonge wants to merge 1 commit into
mainfrom
chore/remove-unconstructed-variants
Open

kvlonge wants to merge 1 commit 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

This branch has not been deployed

No deployments
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