-
-
Notifications
You must be signed in to change notification settings - Fork 815
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
Make include_file
overrule include_ext
#358
Conversation
include_file
overrule include_ext
77a7f87
to
5473afa
Compare
Essentially, a file can now be in `include_file` without having its extension in `include_ext`, which I generally think is the expected behaviour because explicit filenames are more specific than extensions. Fixes: air-verse#350
25d6480
to
dc1da89
Compare
@@ -251,7 +251,7 @@ func (e *Engine) watchPath(path string) error { | |||
if excludeRegex { | |||
break | |||
} | |||
if !e.isIncludeExt(ev.Name) { | |||
if !e.isIncludeExt(ev.Name) && !e.checkIncludeFile(path) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the argument here may need to be ev.Name
, I will re-verify.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the argument here may need to be
ev.Name
, I will re-verify.
I test the code below, it's ok:
if !e.isIncludeExt(ev.Name) && !e.checkIncludeFile(ev.Name) {
I don't know, why marked this pull request as draft, can i recreate new pull request base on the code?
Is there anything problem with this pull request? |
I put it on draft because of #358 (comment), but then forgot about the PR. |
Your PR does my suggested change so let's move to that one. |
(#416) * feat: Make include_file overrule include_ext * feat: Make include_file overrule include_ext unittest
…ase_on: air-verse#358 (air-verse#416) * feat: Make include_file overrule include_ext * feat: Make include_file overrule include_ext unittest
A file can now be in
include_file
without having its extension ininclude_ext
, which I generally think is the expected behaviour because explicit filenames are more specific than extensions.Fixes: #350