Skip to content

Commit

Permalink
feat!: don't add source files if they don't have standard Nim extension
Browse files Browse the repository at this point in the history
FossilOrigin-Name: a2ce2ef17af7b8ba3158410bac5457bde98d6947a7951fd71d6e66c1500558a6
  • Loading branch information
thindil committed Nov 29, 2024
1 parent e959103 commit eb65a76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/config.nim
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ proc parseConfig*(configFile: FilePath; sections: var ExtendedNatural): tuple[
of "directory":
try:
for fileName in walkDirRec(dir = setting.value):
let (_, _, ext) = splitFile(path = fileName)
if ext notin [".nim", ".nims"]:
continue
addFile(fileName = fileName, sources = result.sources)
except OSError:
abortProgram(message = "Can't add files to check, line: " &
Expand Down

0 comments on commit eb65a76

Please sign in to comment.