Skip to content

Commit

Permalink
gettext:todo: Only scan D sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
veelo committed Jul 14, 2023
1 parent fcf2304 commit 810763b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion todo/source/todo.d
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,19 @@ int main()
return 1;
}
foreach (file; json["files"].arrayNoRef)
if (file["role"].str == "source")
if (file["role"].str == "source" && file["path"].str.isDSource)
todo(file["path"].str);

return 0;
}

bool isDSource(string file)
{
import std.algorithm : endsWith;

return (file.endsWith(".d") || file.endsWith(".di") || file.endsWith(".dpp"));
}

void todo(string file)
{
import std.file : readText;
Expand Down

0 comments on commit 810763b

Please sign in to comment.