From e1ae1345d55ae3fbf20958115bea5b3f6ecf550d Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 27 Nov 2020 12:37:46 -0800 Subject: [PATCH] Fix regex for detecting misspelled library.properties The previous paucity of parentheses resulted in the regular expression matching against filenames it was never intended to, resulting in false positives for things like "library.json". --- check/checkfunctions/library.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check/checkfunctions/library.go b/check/checkfunctions/library.go index 2907f5c65..a5179d232 100644 --- a/check/checkfunctions/library.go +++ b/check/checkfunctions/library.go @@ -60,7 +60,7 @@ func MisspelledLibraryPropertiesFileName() (result checkresult.Type, output stri } directoryListing.FilterOutDirs() - path, found := containsMisspelledPathBaseName(directoryListing, "library.properties", "(?i)^librar(y)|(ie)s?[.-_]?propert(y)|(ie)s?$") + path, found := containsMisspelledPathBaseName(directoryListing, "library.properties", "(?i)^librar((y)|(ie))s?[.-_]?propert((y)|(ie))s?$") if found { return checkresult.Fail, path.String() }