-
-
Notifications
You must be signed in to change notification settings - Fork 234
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
fix: add empty glob error when no files match #1259
Conversation
ca5863e
to
cfcf29e
Compare
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.
Thanks @gantony for your contribution!
Feel free to keep reporting and sending PRs! 💪
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1259 +/- ##
=======================================
Coverage 81.68% 81.68%
=======================================
Files 168 168
Lines 9762 9765 +3
=======================================
+ Hits 7974 7977 +3
Misses 1537 1537
Partials 251 251
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Just to confirm, what is the behavior of modsec on this? |
I think this is the exact same behavior as the There could be a new |
Implements #1250.
What
This PR adds an "empty glob" error when trying to include files using a glob pattern, but the pattern does not match any file.
Why
If a user specifies a config file with
Include rules./*.conf
, the intent is that a number of files will be parsed (at least 1 😅).If for some reason the glob pattern does not match any file, we should return an error so that the user realizes there is a problem with the configuration.
The user can then fix the glob pattern (or remove it if not needed), instead of assuming that the expected configuration files have been loaded.
Checklist