aboutsummaryrefslogtreecommitdiff
path: root/cmd/gettext
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2023-10-24 07:40:04 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2023-10-24 07:40:04 +0200
commit13759f7445800856112ad1ed3306b3baa60f73f6 (patch)
tree939e12be756a13b3660f7accb9cf5b388e3ad100 /cmd/gettext
parent435397de49adc9740bc67416166aba4d0be8ae2a (diff)
fix: Ignore some non sec issuesv0.1.0
Diffstat (limited to 'cmd/gettext')
-rw-r--r--cmd/gettext/gettext.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/gettext/gettext.go b/cmd/gettext/gettext.go
index 7abb6e2..b753da8 100644
--- a/cmd/gettext/gettext.go
+++ b/cmd/gettext/gettext.go
@@ -97,7 +97,7 @@ func extractAllKeys() map[string]int {
err := filepath.Walk("templates", func(path string, info fs.FileInfo, err error) error {
if !info.IsDir() && filepath.Ext(path) == ".html" {
- content, err := os.ReadFile(path)
+ content, err := os.ReadFile(path) // #nosec G304
core.Expect(err, "error reading file")
for key, value := range extractKeys(string(content)) {
extractedKeys[key] = value
@@ -124,7 +124,7 @@ func main() {
currentLocales := make(map[string]string, 0)
newLocales := make(map[string]string, 0)
- locales, err := os.ReadFile(filepath.Join("locales", lang, "index.yml"))
+ locales, err := os.ReadFile(filepath.Join("locales", lang, "index.yml")) // #nosec G304
core.Expect(err, "error reading file")
core.Expect(yaml.Unmarshal(locales, &currentLocales), "error unmarshalling yaml")