We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69086d5 commit 919d27bCopy full SHA for 919d27b
cmd/checkapi/main.go
@@ -23,6 +23,10 @@ import (
23
"github.com/open-telemetry/opentelemetry-collector-contrib/cmd/checkapi/internal"
24
)
25
26
+const (
27
+ unkeyedFieldsLimit = 6
28
+)
29
+
30
func main() {
31
folder := flag.String("folder", ".", "folder investigated for modules")
32
configPath := flag.String("config", "cmd/checkapi/config.yaml", "configuration file")
@@ -293,6 +297,9 @@ func checkStructDisallowUnkeyedLiteral(s *apistruct, folder string) error {
293
297
if !unicode.IsUpper(rune(s.Name[0])) {
294
298
return nil
295
299
}
300
+ if len(s.Fields) > unkeyedFieldsLimit {
301
+ return nil
302
+ }
296
303
for _, f := range s.Fields {
304
if !unicode.IsUpper(rune(f[0])) {
305
0 commit comments