File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -301,7 +301,8 @@ static async Task<int> Validate(string input, bool strict)
301301 . Concat ( Directory . GetFiles ( inputDir , "*.md" , SearchOption . AllDirectories ) )
302302 . Where ( f => ! f . Contains ( Path . Combine ( "code" , "enums" ) ) ) // Exclude enum files
303303 . Where ( f => ! f . Contains ( Path . Combine ( "code" , "shared-examples" ) ) ) // Exclude shared examples
304- . Where ( f => ! Path . GetFileName ( f ) . Equals ( "README.md" , StringComparison . OrdinalIgnoreCase ) ) // Exclude README
304+ . Where ( f => ! ( Path . GetExtension ( f ) . Equals ( ".md" , StringComparison . OrdinalIgnoreCase )
305+ && Path . GetDirectoryName ( Path . GetFullPath ( f ) ) == resolvedInputDir ) ) // Exclude top-level .md files
305306 . Where ( f => ! Path . GetFullPath ( f ) [ resolvedInputDir . Length ..] // Exclude dotfile directories
306307 . Split ( Path . DirectorySeparatorChar , Path . AltDirectorySeparatorChar )
307308 . Any ( segment => segment . StartsWith ( '.' ) ) )
You can’t perform that action at this time.
0 commit comments