diff --git a/cmd/validator/validator.go b/cmd/validator/validator.go index 439eb39..e80f8b3 100644 --- a/cmd/validator/validator.go +++ b/cmd/validator/validator.go @@ -83,7 +83,9 @@ func validatorUsage() { func getFileTypes() []string { options := make([]string, 0, len(filetype.FileTypes)) for _, typ := range filetype.FileTypes { - options = append(options, typ.Name) + for extName := range typ.Extensions { + options = append(options, extName) + } } sort.Strings(options) return options @@ -154,6 +156,7 @@ Supported formats: standard, json, junit (default: "standard")`, } if *excludeFileTypesPtr != "" { + *excludeFileTypesPtr = strings.ToLower(*excludeFileTypesPtr) if !validateFileTypeList(strings.Split(*excludeFileTypesPtr, ",")) { return validatorConfig{}, errors.New("Invalid exclude file type") }