Skip to content

Add hidden flag to control when hidden files are ignored#601

Merged
sunng87 merged 6 commits into
sunng87:masterfrom
yhakbar:adding_hidden_flag
Aug 31, 2023
Merged

Add hidden flag to control when hidden files are ignored#601
sunng87 merged 6 commits into
sunng87:masterfrom
yhakbar:adding_hidden_flag

Conversation

@yhakbar

@yhakbar yhakbar commented Aug 27, 2023

Copy link
Copy Markdown
Contributor

Would you be willing to accept this adjustment to allow for an additional hidden parameter to be passed into register_templates_directory to control whether hidden files are ignored?

This would allow for template directories that contained hidden files which should be registered.

Comment thread src/registry.rs Outdated
&mut self,
tpl_extension: &str,
dir_path: P,
hidden: bool,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make a DirectorySourceOptions struct other potential options?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can do that, @sunng87 !

Do you want any options available in the struct other than hidden right now?

I don't know if you ever want temporary files to be pulled in when working with a template directory, but they're checked in the same place, so I can add a temporary option too if you want that.

@yhakbar yhakbar Aug 28, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit is my best guess as to how this should be handled.

@yhakbar yhakbar requested a review from sunng87 August 28, 2023 14:37
@yhakbar yhakbar force-pushed the adding_hidden_flag branch from caf7232 to ee83fd0 Compare August 28, 2023 14:40
@sunng87

sunng87 commented Aug 29, 2023

Copy link
Copy Markdown
Owner

Thank you very much @yhakbar . The patch is almost LGTM. There is a minor lint issue to resolve.

@yhakbar

yhakbar commented Aug 29, 2023

Copy link
Copy Markdown
Contributor Author

Thank you very much @yhakbar . The patch is almost LGTM. There is a minor lint issue to resolve.

Whoops! Should be good now.

@sunng87

sunng87 commented Aug 30, 2023

Copy link
Copy Markdown
Owner

rustfmt is broken again, you can fix it and verify from your local code base

@coveralls

coveralls commented Aug 30, 2023

Copy link
Copy Markdown

Coverage Status

coverage: 81.021% (+0.02%) from 81.002% when pulling 8de1ca7 on yhakbar:adding_hidden_flag into 683f521 on sunng87:master.

@yhakbar

yhakbar commented Aug 30, 2023

Copy link
Copy Markdown
Contributor Author

rustfmt is broken again, you can fix it and verify from your local code base

Formatted.

@sunng87 sunng87 merged commit 01dd891 into sunng87:master Aug 31, 2023
@sunng87

sunng87 commented Aug 31, 2023

Copy link
Copy Markdown
Owner

@yhakbar Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants