Add duplicate detection for compose record values
For now only case-sensitive detection is supported, there are 2 type of duplicate detection, one is strict mode which will throw an error on record save if there is any duplicate record with matching value and non-strict mode will only show a warning and won't prevent record saving.
This commit is contained in:
Generated
+5
-3
@@ -43,9 +43,10 @@ func Proc() {
|
||||
|
||||
// workaround because
|
||||
// filepath.Join merges "*","*" into "**" instead of "*/*"
|
||||
typeSrcPath = filepath.Join("*"+string(filepath.Separator)+"*", "types.yaml")
|
||||
typeSrc []string
|
||||
typeDefs []*typesDef
|
||||
pkgTypeSrcPath = filepath.Join("*"+string(filepath.Separator)+"*"+string(filepath.Separator)+"*", "types.yaml")
|
||||
typeSrcPath = filepath.Join("*"+string(filepath.Separator)+"*", "types.yaml")
|
||||
typeSrc []string
|
||||
typeDefs []*typesDef
|
||||
|
||||
// workaround because
|
||||
// filepath.Join merges "*","*" into "**" instead of "*/*"
|
||||
@@ -144,6 +145,7 @@ func Proc() {
|
||||
output("loaded %d event definitions from %s\n", len(eventSrc), eventSrcPath)
|
||||
|
||||
typeSrc = glob(typeSrcPath)
|
||||
typeSrc = append(typeSrc, glob(pkgTypeSrcPath)...)
|
||||
output("loaded %d type definitions from %s\n", len(typeSrc), typeSrcPath)
|
||||
|
||||
exprTypeSrc = glob(exprTypeSrcPath)
|
||||
|
||||
Reference in New Issue
Block a user