feat: 允许解析 services.gen.go 文件,增强生成文件的支持
This commit is contained in:
@@ -114,10 +114,13 @@ func (c *ParserContext) ShouldIncludeFile(filePath string) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip generated files if not allowed, but allow routes.gen.go since it may contain providers
|
// Skip generated files if not allowed, but allow routes.gen.go and services.gen.go since they may contain providers
|
||||||
if !c.Config.AllowGenFiles && strings.HasSuffix(filePath, ".gen.go") && !strings.HasSuffix(filePath, "routes.gen.go") {
|
if !c.Config.AllowGenFiles {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
// if !c.Config.AllowGenFiles && strings.HasSuffix(filePath, ".gen.go") && !strings.HasSuffix(filePath, "routes.gen.go") && !strings.HasSuffix(filePath, "services.gen.go") {
|
||||||
|
// return false
|
||||||
|
// }
|
||||||
|
|
||||||
// Check file size
|
// Check file size
|
||||||
if info, err := os.Stat(filePath); err == nil {
|
if info, err := os.Stat(filePath); err == nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user