feat: add tools formitychecker

This commit is contained in:
Xinwei Xiong (cubxxw) 2024-03-19 12:14:55 +08:00
parent e748ffa67c
commit aa135131a8

View File

@ -61,7 +61,7 @@ func (c *Checker) checkPath(path string, info os.FileInfo, err error) error {
c.Summary.Issues = append(c.Summary.Issues, Issue{ c.Summary.Issues = append(c.Summary.Issues, Issue{
Type: "ignoredDirectory", Type: "ignoredDirectory",
Path: path, Path: path,
Message: "此目录已被忽略", Message: "This directory has been ignored",
}) })
return filepath.SkipDir return filepath.SkipDir
} }
@ -69,7 +69,7 @@ func (c *Checker) checkPath(path string, info os.FileInfo, err error) error {
c.Summary.Issues = append(c.Summary.Issues, Issue{ c.Summary.Issues = append(c.Summary.Issues, Issue{
Type: "directoryNaming", Type: "directoryNaming",
Path: path, Path: path,
Message: "目录名称不符合规范", Message: "The directory name is invalid",
}) })
} }
} else { } else {
@ -81,7 +81,7 @@ func (c *Checker) checkPath(path string, info os.FileInfo, err error) error {
c.Summary.Issues = append(c.Summary.Issues, Issue{ c.Summary.Issues = append(c.Summary.Issues, Issue{
Type: "fileNaming", Type: "fileNaming",
Path: path, Path: path,
Message: "文件名称不符合规范", Message: "The file name does not comply with the specification",
}) })
} }
} }