Skip to content

Commit 945f692

Browse files
committed
Only consider markdown file changes
1 parent 62be572 commit 945f692

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/tooling/docs-builder/Cli/DiffCommands.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@ public async Task<int> ValidateRedirects(string? path = null, Cancel ctx = defau
7777
c.ChangeType is GitChangeType.Deleted or GitChangeType.Renamed
7878
&& !redirects.ContainsKey(c is RenamedGitChange renamed ? renamed.OldFilePath : c.FilePath)
7979
)
80-
.Where(c => !fs.FileInfo.New(c.FilePath).HasParent("_snippets"))
80+
.Where(c =>
81+
{
82+
var fi = fs.FileInfo.New(c.FilePath);
83+
if (fi.Extension != ".md")
84+
return false;
85+
return !fi.HasParent("_snippets");
86+
})
8187
.ToArray();
8288

8389
foreach (var notFound in missingRedirects)

0 commit comments

Comments
 (0)