From f4820c03b48ce85103956c9849cbf1d0f2d5d20e Mon Sep 17 00:00:00 2001 From: whzy <2402686765@qq.com> Date: Wed, 3 Jun 2026 13:43:56 +0800 Subject: [PATCH] fix(i18n): align schema and gosec annotation --- internal/i18n/cmd/check/main.go | 1 + internal/i18n/schema/messages.schema.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/i18n/cmd/check/main.go b/internal/i18n/cmd/check/main.go index 7361d65..23539fd 100644 --- a/internal/i18n/cmd/check/main.go +++ b/internal/i18n/cmd/check/main.go @@ -44,6 +44,7 @@ func main() { } func checkLocaleFormat(fix bool) error { + // #nosec G703 -- pattern is repo-local and not user-controlled. files, err := filepath.Glob(filepath.Join("internal", "i18n", "locales", "*.json")) if err != nil { return err diff --git a/internal/i18n/schema/messages.schema.json b/internal/i18n/schema/messages.schema.json index ebc8f53..861ea9b 100644 --- a/internal/i18n/schema/messages.schema.json +++ b/internal/i18n/schema/messages.schema.json @@ -7,6 +7,6 @@ "minLength": 1 }, "propertyNames": { - "pattern": "^(cmd|flag|error|output|prompt|success|warning|table)\\.[a-z0-9_.-]+$" + "pattern": "^(cmd|flag|error|prompt|success|warning|confirm|table|output)\\.[a-z0-9_.-]+$" } }