We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 742293a commit c4ab8d5Copy full SHA for c4ab8d5
pkg/plugins/golang/v4/init.go
@@ -188,8 +188,16 @@ func checkDir() error {
188
return nil
189
}
190
// Deny files with .go or .yaml extensions
191
- if strings.HasSuffix(info.Name(), ".go") || strings.HasSuffix(info.Name(), ".yaml") {
192
- return fmt.Errorf("target directory contains disallowed file %q", path)
+ disallowedExtensions := []string{
+ ".go",
193
+ ".yaml",
194
+ ".mod",
195
+ ".sum",
196
+ }
197
+ for _, ext := range disallowedExtensions {
198
+ if strings.HasSuffix(info.Name(), ext) {
199
+ return fmt.Errorf("target directory contains disallowed file %q", path)
200
201
202
203
0 commit comments