Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enforce GlobMatcherOptions.AllowDotMatch option for file's excludePatterns #9634

Closed

Conversation

filzrev
Copy link
Contributor

@filzrev filzrev commented Jan 22, 2024

This PR intended to fix #8913 issue.

By default. docfx exclude directories/files that name starts with dot char .
And there are two options available to include these files.

But when using Option1.
There is problem that can't exclude some paths by using exclude settings.
Because default AllowDotMatch:false settings is also applied to exclude filter rules.

This PR enforce AllowDotMatch options for exclude filter rules.

@filzrev filzrev changed the title feat: Enforce GlobMatcherOptions.AllowDotMatch for file's excludePatterns feat: Enforce GlobMatcherOptions.AllowDotMatch option for file's excludePatterns Jan 22, 2024
Copy link

codecov bot commented Jan 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ad6db16) 74.31% compared to head (b7fd2dc) 74.29%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9634      +/-   ##
==========================================
- Coverage   74.31%   74.29%   -0.02%     
==========================================
  Files         536      536              
  Lines       23173    23173              
  Branches     4054     4054              
==========================================
- Hits        17220    17217       -3     
- Misses       4851     4853       +2     
- Partials     1102     1103       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yufeih
Copy link
Contributor

yufeih commented Jan 29, 2024

I'm leaning towards gradually retire the various glob config options (dot, noExpand, noNegate, noGlobStar, case) and move to a standard glob behavior, making it easier to switch the underlying glob implementation in the future.

This PR seems to go against that direction by introducing different behaviors for include vs exclude.

It seems TypeScript also does not glob dot files: microsoft/TypeScript#49555

@filzrev
Copy link
Contributor Author

filzrev commented Jan 29, 2024

I'm leaning towards gradually retire the various glob config options (dot, noExpand, noNegate, noGlobStar, case) and move to a standard glob behavior

I agree with that direction.

I takes approach to not including that starts with root wildcard.
(e.g. Use articles/**/..attachments/** instead of **/.attachments/**)

@filzrev filzrev closed this Jan 29, 2024
@filzrev filzrev deleted the feat-enable-dotmatch-for-excludepattern branch April 1, 2024 05:03
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.

[Bug] "exclude" is not works when path fragments contains folder that starts with '.'
2 participants