From 4149e70285a0a8c49f9352f858cf4f9570d65ea2 Mon Sep 17 00:00:00 2001 From: Konrad Jamrozik Date: Fri, 3 Feb 2023 14:47:27 -0800 Subject: [PATCH] Improve warning messages on invalid `CODEOWNERS` paths. (#5325) --- .../CodeOwnersParser/MatchedCodeownersEntry.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/code-owners-parser/CodeOwnersParser/MatchedCodeownersEntry.cs b/tools/code-owners-parser/CodeOwnersParser/MatchedCodeownersEntry.cs index 5bdc43e69de..116f71e0a19 100644 --- a/tools/code-owners-parser/CodeOwnersParser/MatchedCodeownersEntry.cs +++ b/tools/code-owners-parser/CodeOwnersParser/MatchedCodeownersEntry.cs @@ -163,7 +163,8 @@ private static bool ContainsUnsupportedSequences(string codeownersPath) { Console.Error.WriteLine( $"CODEOWNERS path \"{codeownersPath}\" ends with " + - "unsupported sequence of \"/**\". Replace it with \"/\"."); + "unsupported sequence of \"/**\". Replace it with \"/\". " + + "Until then this path will never match."); return true; } @@ -173,7 +174,8 @@ private static bool ContainsUnsupportedSequences(string codeownersPath) { Console.Error.WriteLine( $"CODEOWNERS path \"{codeownersPath}\" ends with " + - "unsupported sequence of \"/**/\". Replace it with \"/**\"."); + "unsupported sequence of \"/**/\". Replace it with \"/\". " + + "Until then this path will never match."); return true; } @@ -184,8 +186,9 @@ private static bool ContainsUnsupportedSequences(string codeownersPath) { Console.Error.WriteLine( $"CODEOWNERS path \"{codeownersPath}\" contains " + - "unsupported sequence of \"**\" that is not \"/**/\". Replace it with \"*\". " + - "Until then this path will never match."); + "unsupported sequence of \"**\". Double star can be used only within slashes \"/**/\" " + + "or as a top-level catch all path of \"/**\". " + + "Currently this path will never match."); return true; }