From 4f5fb500148485dcbf407ab428f044ae879a3bcc Mon Sep 17 00:00:00 2001 From: Greg Steuck <greg@nest.cx> Date: Sun, 27 Aug 2023 20:08:51 -0700 Subject: [PATCH] Repair `codes` test on OpenBSD by explicitly requesting extended RE --- linters/lint-codes/LintCodes/Coverage.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linters/lint-codes/LintCodes/Coverage.hs b/linters/lint-codes/LintCodes/Coverage.hs index 1f4b570bbfd2..e70884efbe1f 100644 --- a/linters/lint-codes/LintCodes/Coverage.hs +++ b/linters/lint-codes/LintCodes/Coverage.hs @@ -26,7 +26,7 @@ getCoveredCodes = -- Run git grep on .stdout and .stderr files in the testsuite subfolder. do { codes <- lines <$> readProcess "git" - [ "grep", "-oh", codeRegex + [ "grep", "-Eoh", codeRegex -- -oh: only show the match, and omit the filename. , "--", ":/testsuite/*.stdout", ":/testsuite/*.stderr" , ":!*/codes.stdout" -- Don't include the output of this test itself. @@ -35,7 +35,7 @@ getCoveredCodes = -- | Regular expression to parse a diagnostic code. codeRegex :: String -codeRegex = "\\[[A-Za-z]\\+-[0-9]\\+\\]" +codeRegex = "\\[[A-Za-z]+-[0-9]+\\]" -- | Turn a string that matches the 'codeRegex' regular expression -- into its corresponding 'DiagnosticCode'. -- GitLab