diff --git a/src/MarkdownSnippets/ContentValidation.cs b/src/MarkdownSnippets/ContentValidation.cs index 1cc70514..75b20288 100644 --- a/src/MarkdownSnippets/ContentValidation.cs +++ b/src/MarkdownSnippets/ContentValidation.cs @@ -64,6 +64,8 @@ static class ContentValidation "whereof" }.ToFrozenSet(); + static string invalidWordList = string.Join(", ", invalidWordSet.Order()); + static FrozenDictionary[]> phrasesByFirstWord = phrases .GroupBy(p => @@ -98,7 +100,7 @@ static class ContentValidation { if (invalidWordSet.Contains(word) && seenWords.Add(word)) { - yield return ($"Invalid word detected: '{word}'", start - 1); + yield return ($"Invalid word detected: '{word}'. The full list of invalid words is: {invalidWordList}", start - 1); } } diff --git a/src/Tests/ContentValidationTest.CheckInvalidWord.verified.txt b/src/Tests/ContentValidationTest.CheckInvalidWord.verified.txt index 09877006..da69c10c 100644 --- a/src/Tests/ContentValidationTest.CheckInvalidWord.verified.txt +++ b/src/Tests/ContentValidationTest.CheckInvalidWord.verified.txt @@ -1,6 +1,6 @@ [ { - Item1: Invalid word detected: 'you', + Item1: Invalid word detected: 'you'. The full list of invalid words is: above-mentioned, aforementioned, easy, feel, foregoing, henceforth, hereafter, heretofore, herewith, just, our, please, simple, simply, thereafter, thereof, therewith, think, us, we, whatsoever, whereat, wherein, whereof, you, your, yourself, Item2: 1 } ] \ No newline at end of file diff --git a/src/Tests/ContentValidationTest.CheckInvalidWordIndicatesAllViolationsInTheExceptionMessage.verified.txt b/src/Tests/ContentValidationTest.CheckInvalidWordIndicatesAllViolationsInTheExceptionMessage.verified.txt index fa33665b..ae2d6fa5 100644 --- a/src/Tests/ContentValidationTest.CheckInvalidWordIndicatesAllViolationsInTheExceptionMessage.verified.txt +++ b/src/Tests/ContentValidationTest.CheckInvalidWordIndicatesAllViolationsInTheExceptionMessage.verified.txt @@ -4,11 +4,11 @@ Item2: 20 }, { - Item1: Invalid word detected: 'you', + Item1: Invalid word detected: 'you'. The full list of invalid words is: above-mentioned, aforementioned, easy, feel, foregoing, henceforth, hereafter, heretofore, herewith, just, our, please, simple, simply, thereafter, thereof, therewith, think, us, we, whatsoever, whereat, wherein, whereof, you, your, yourself, Item2: 1 }, { - Item1: Invalid word detected: 'yourself', + Item1: Invalid word detected: 'yourself'. The full list of invalid words is: above-mentioned, aforementioned, easy, feel, foregoing, henceforth, hereafter, heretofore, herewith, just, our, please, simple, simply, thereafter, thereof, therewith, think, us, we, whatsoever, whereat, wherein, whereof, you, your, yourself, Item2: 27 } ] \ No newline at end of file diff --git a/src/Tests/ContentValidationTest.CheckInvalidWordIndicatesAllViolationsInTheExceptionMessageIgnoringCase.verified.txt b/src/Tests/ContentValidationTest.CheckInvalidWordIndicatesAllViolationsInTheExceptionMessageIgnoringCase.verified.txt index 5f751764..ea3edc22 100644 --- a/src/Tests/ContentValidationTest.CheckInvalidWordIndicatesAllViolationsInTheExceptionMessageIgnoringCase.verified.txt +++ b/src/Tests/ContentValidationTest.CheckInvalidWordIndicatesAllViolationsInTheExceptionMessageIgnoringCase.verified.txt @@ -4,15 +4,15 @@ Item2: 20 }, { - Item1: Invalid word detected: 'you', + Item1: Invalid word detected: 'you'. The full list of invalid words is: above-mentioned, aforementioned, easy, feel, foregoing, henceforth, hereafter, heretofore, herewith, just, our, please, simple, simply, thereafter, thereof, therewith, think, us, we, whatsoever, whereat, wherein, whereof, you, your, yourself, Item2: 1 }, { - Item1: Invalid word detected: 'yourself', + Item1: Invalid word detected: 'yourself'. The full list of invalid words is: above-mentioned, aforementioned, easy, feel, foregoing, henceforth, hereafter, heretofore, herewith, just, our, please, simple, simply, thereafter, thereof, therewith, think, us, we, whatsoever, whereat, wherein, whereof, you, your, yourself, Item2: 27 }, { - Item1: Invalid word detected: 'us', + Item1: Invalid word detected: 'us'. The full list of invalid words is: above-mentioned, aforementioned, easy, feel, foregoing, henceforth, hereafter, heretofore, herewith, just, our, please, simple, simply, thereafter, thereof, therewith, think, us, we, whatsoever, whereat, wherein, whereof, you, your, yourself, Item2: 37 } ] \ No newline at end of file diff --git a/src/Tests/ContentValidationTest.CheckInvalidWordSentenceEnd.verified.txt b/src/Tests/ContentValidationTest.CheckInvalidWordSentenceEnd.verified.txt index 09877006..da69c10c 100644 --- a/src/Tests/ContentValidationTest.CheckInvalidWordSentenceEnd.verified.txt +++ b/src/Tests/ContentValidationTest.CheckInvalidWordSentenceEnd.verified.txt @@ -1,6 +1,6 @@ [ { - Item1: Invalid word detected: 'you', + Item1: Invalid word detected: 'you'. The full list of invalid words is: above-mentioned, aforementioned, easy, feel, foregoing, henceforth, hereafter, heretofore, herewith, just, our, please, simple, simply, thereafter, thereof, therewith, think, us, we, whatsoever, whereat, wherein, whereof, you, your, yourself, Item2: 1 } ] \ No newline at end of file diff --git a/src/Tests/ContentValidationTest.CheckInvalidWordSentenceStart.verified.txt b/src/Tests/ContentValidationTest.CheckInvalidWordSentenceStart.verified.txt index 2d1ebca5..9521f782 100644 --- a/src/Tests/ContentValidationTest.CheckInvalidWordSentenceStart.verified.txt +++ b/src/Tests/ContentValidationTest.CheckInvalidWordSentenceStart.verified.txt @@ -1,5 +1,5 @@ [ { - Item1: Invalid word detected: 'you' + Item1: Invalid word detected: 'you'. The full list of invalid words is: above-mentioned, aforementioned, easy, feel, foregoing, henceforth, hereafter, heretofore, herewith, just, our, please, simple, simply, thereafter, thereof, therewith, think, us, we, whatsoever, whereat, wherein, whereof, you, your, yourself } ] \ No newline at end of file diff --git a/src/Tests/ContentValidationTest.CheckInvalidWordStringEnd.verified.txt b/src/Tests/ContentValidationTest.CheckInvalidWordStringEnd.verified.txt index 86acfc85..40218a96 100644 --- a/src/Tests/ContentValidationTest.CheckInvalidWordStringEnd.verified.txt +++ b/src/Tests/ContentValidationTest.CheckInvalidWordStringEnd.verified.txt @@ -1,6 +1,6 @@ [ { - Item1: Invalid word detected: 'you', + Item1: Invalid word detected: 'you'. The full list of invalid words is: above-mentioned, aforementioned, easy, feel, foregoing, henceforth, hereafter, heretofore, herewith, just, our, please, simple, simply, thereafter, thereof, therewith, think, us, we, whatsoever, whereat, wherein, whereof, you, your, yourself, Item2: 4 } ] \ No newline at end of file diff --git a/src/Tests/ContentValidationTest.CheckInvalidWordWithComma.verified.txt b/src/Tests/ContentValidationTest.CheckInvalidWordWithComma.verified.txt index 09877006..da69c10c 100644 --- a/src/Tests/ContentValidationTest.CheckInvalidWordWithComma.verified.txt +++ b/src/Tests/ContentValidationTest.CheckInvalidWordWithComma.verified.txt @@ -1,6 +1,6 @@ [ { - Item1: Invalid word detected: 'you', + Item1: Invalid word detected: 'you'. The full list of invalid words is: above-mentioned, aforementioned, easy, feel, foregoing, henceforth, hereafter, heretofore, herewith, just, our, please, simple, simply, thereafter, thereof, therewith, think, us, we, whatsoever, whereat, wherein, whereof, you, your, yourself, Item2: 1 } ] \ No newline at end of file diff --git a/src/Tests/ContentValidationTest.CheckInvalidWordWithQuestionMark.verified.txt b/src/Tests/ContentValidationTest.CheckInvalidWordWithQuestionMark.verified.txt index 09877006..da69c10c 100644 --- a/src/Tests/ContentValidationTest.CheckInvalidWordWithQuestionMark.verified.txt +++ b/src/Tests/ContentValidationTest.CheckInvalidWordWithQuestionMark.verified.txt @@ -1,6 +1,6 @@ [ { - Item1: Invalid word detected: 'you', + Item1: Invalid word detected: 'you'. The full list of invalid words is: above-mentioned, aforementioned, easy, feel, foregoing, henceforth, hereafter, heretofore, herewith, just, our, please, simple, simply, thereafter, thereof, therewith, think, us, we, whatsoever, whereat, wherein, whereof, you, your, yourself, Item2: 1 } ] \ No newline at end of file diff --git a/src/Tests/DirectoryMarkdownProcessorTests.ValidationErrors.verified.txt b/src/Tests/DirectoryMarkdownProcessorTests.ValidationErrors.verified.txt index 179433c2..6f584e15 100644 --- a/src/Tests/DirectoryMarkdownProcessorTests.ValidationErrors.verified.txt +++ b/src/Tests/DirectoryMarkdownProcessorTests.ValidationErrors.verified.txt @@ -2,12 +2,12 @@ Type: ContentValidationException, Errors: [ { - Error: Invalid word detected: 'you', + Error: Invalid word detected: 'you'. The full list of invalid words is: above-mentioned, aforementioned, easy, feel, foregoing, henceforth, hereafter, heretofore, herewith, just, our, please, simple, simply, thereafter, thereof, therewith, think, us, we, whatsoever, whereat, wherein, whereof, you, your, yourself, Line: 1, File: {CurrentDirectory}DirectoryMarkdownProcessor/ValidationErrors/one.source.md }, { - Error: Invalid word detected: 'we', + Error: Invalid word detected: 'we'. The full list of invalid words is: above-mentioned, aforementioned, easy, feel, foregoing, henceforth, hereafter, heretofore, herewith, just, our, please, simple, simply, thereafter, thereof, therewith, think, us, we, whatsoever, whereat, wherein, whereof, you, your, yourself, Line: 2, Column: 1, File: {CurrentDirectory}DirectoryMarkdownProcessor/ValidationErrors/one.source.md @@ -21,11 +21,11 @@ ], Message: Content validation errors: -Invalid word detected: 'you' +Invalid word detected: 'you'. The full list of invalid words is: above-mentioned, aforementioned, easy, feel, foregoing, henceforth, hereafter, heretofore, herewith, just, our, please, simple, simply, thereafter, thereof, therewith, think, us, we, whatsoever, whereat, wherein, whereof, you, your, yourself File: {CurrentDirectory}DirectoryMarkdownProcessor/ValidationErrors/one.source.md Line: 1 Column: 0 -Invalid word detected: 'we' +Invalid word detected: 'we'. The full list of invalid words is: above-mentioned, aforementioned, easy, feel, foregoing, henceforth, hereafter, heretofore, herewith, just, our, please, simple, simply, thereafter, thereof, therewith, think, us, we, whatsoever, whereat, wherein, whereof, you, your, yourself File: {CurrentDirectory}DirectoryMarkdownProcessor/ValidationErrors/one.source.md Line: 2 Column: 1