Skip to content

Commit 90b515f

Browse files
committed
feat: add allowed files about tools version management files in go init v4
Signed-off-by: Robin LIORET <[email protected]>
1 parent bfb7c3d commit 90b515f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pkg/plugins/golang/v4/init.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,17 @@ func checkDir() error {
190190
if isCapitalized && info.Name() != "PROJECT" {
191191
return nil
192192
}
193+
allowedFiles := []string{
194+
// User might use tool versions management tools to set up the environment including kubebuilder and go version
195+
"mise.toml", // mise-en-place configuration file
196+
".tool-versions", // asdf configuration file
197+
}
198+
// Allow files used by tool versions management
199+
for _, ext := range allowedFiles {
200+
if info.Name() == ext {
201+
return nil
202+
}
203+
}
193204
disallowedExtensions := []string{
194205
".go",
195206
".yaml",

0 commit comments

Comments
 (0)