Skip to content

Enforce formatter name doesn't contain bad characters#513

Merged
brianmcgee merged 2 commits intomainfrom
feat/validate-formatter-name
Jan 30, 2025
Merged

Enforce formatter name doesn't contain bad characters#513
brianmcgee merged 2 commits intomainfrom
feat/validate-formatter-name

Conversation

@brianmcgee
Copy link
Member

As the title suggests.

Recently discovered in https://github.com/numtide/treefmt-nix that names with / could be passed through and would break execution. This enforces simple formatted names in config and when passing as formatters arg.

Also fixes misuse of the assertions API.

Signed-off-by: Brian McGee <brian@bmcgee.ie>
@brianmcgee brianmcgee requested review from jfly and zimbatm January 23, 2025 21:08
Signed-off-by: Brian McGee <brian@bmcgee.ie>
@brianmcgee brianmcgee force-pushed the feat/validate-formatter-name branch from da69590 to 43f943f Compare January 30, 2025 13:38
@brianmcgee brianmcgee merged commit e5fe20e into main Jan 30, 2025
28 of 33 checks passed
@brianmcgee brianmcgee deleted the feat/validate-formatter-name branch January 30, 2025 13:43
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.

2 participants