fix: clang formatter name (#3042)

Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
pull/3160/head
pancake 2025-10-14 02:55:18 +02:00 committed by GitHub
parent dbe9fd00b7
commit 4d68ee5d2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -15,7 +15,10 @@ export namespace Format {
const enabled: Record<string, boolean> = {}
const cfg = await Config.get()
const formatters = { ...Formatter } as Record<string, Formatter.Info>
const formatters: Record<string, Formatter.Info> = {}
for (const item of Object.values(Formatter)) {
formatters[item.name] = item
}
for (const [name, item] of Object.entries(cfg.formatter ?? {})) {
if (item.disabled) {
delete formatters[name]