Skip to content

Commit 7d81b29

Browse files
Merge pull request #166 from DiogoRibeiro7/codex/adicionar-verificação-istextfile-em-extracttodoswithstructur
Add text file check in structured TODO extraction
2 parents f44fa39 + 27d74bc commit 7d81b29

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/parser/extractTodosWithStructuredTagsFromDir.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ export function extractTodosWithStructuredTagsFromDir(dir: string): TodoItem[] {
2020
if (IGNORED_DIRS.includes(entry.name)) continue;
2121
walk(fullPath);
2222
} else if (entry.isFile()) {
23-
try {
24-
const fileTodos = extractTodosWithStructuredTags(fullPath);
25-
todos.push(...fileTodos);
26-
} catch {
27-
// opcional: log de ficheiros ignorados
23+
if (isTextFile(fullPath)) {
24+
try {
25+
const fileTodos = extractTodosWithStructuredTags(fullPath);
26+
todos.push(...fileTodos);
27+
} catch {
28+
// opcional: log de ficheiros ignorados
29+
}
2830
}
2931
}
3032
}

0 commit comments

Comments
 (0)