Ignore hidden files in include paths#39
Merged
Merged
Conversation
chevdor
added a commit
that referenced
this pull request
Jul 14, 2026
Follow-up to #39 / #11: - Replace the include glob with an explicit walkdir scan so hidden *directories* (e.g. .git, .cache) are pruned too, not only hidden files; the previous pattern **/[!.]* still parsed files inside them. - Add an --include-hidden flag to restore the old behavior for users whose templates live in dotfiles or hidden folders. - Generate the hidden-file fixtures at test runtime in a temp dir instead of committing a .DS_Store to the repo (Finder rewrites it, global gitignores fight it), and cover both the default and the --include-hidden paths. - Document the new behavior in README and regenerate doc/usage.adoc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.DS_Storewhen recursively loading include templates.txtincludes workingRoot cause
The include glob used
**/*, so Tera tried to parse hidden filesystem metadata as templates.Validation
.DS_Storein the include path.txttemplatecargo test --locked— 24 passingcargo test --locked --all-features— 25 passingcargo check --lockedcargo check --locked --all-featurescargo clippy --locked --all-features --all-targets -- -D warningscargo fmt --all -- --checkgit diff --checkFixes #11