Skip to content

Support shell wildcards in generator name filters - #610

Merged
go-jet merged 1 commit into
go-jet:masterfrom
ChrisJr404:generator-wildcard-filters
Aug 30, 2026
Merged

Support shell wildcards in generator name filters#610
go-jet merged 1 commit into
go-jet:masterfrom
ChrisJr404:generator-wildcard-filters

Conversation

@ChrisJr404

Copy link
Copy Markdown
Contributor

Closes #518.

Right now -ignore-tables (and -ignore-views/-ignore-enums, plus the allow-list variants) only match names exactly. With partitioned tables the partition names change over time, so you end up listing every one by hand and editing the list whenever they rotate.

This lets the entries use shell wildcards through path.Match, so payment_* ignores payment_2020, payment_2021 and so on. Names without any wildcard characters still match exactly, so existing setups keep working the same way.

Added unit tests for the matcher and the shouldSkip helpers.

The -ignore-tables, -ignore-views and -ignore-enums flags (and their
allow-list counterparts) only matched names exactly, so ignoring
partitioned tables meant listing every partition by hand and updating
that list whenever partitions rotated. Match names with path.Match so a
single pattern like "payment_*" covers them. Names without wildcard
characters still match exactly, so existing configs behave as before.

Closes go-jet#518
@go-jet

go-jet commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Thanks. LGTM. 👍

@go-jet
go-jet merged commit 2f15bab into go-jet:master Aug 30, 2026
5 checks passed
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.

Add wildcard support for -ignore-tables option

2 participants