-
-
Notifications
You must be signed in to change notification settings - Fork 536
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
allow ! ( and ) in ignorePatterns via website #396
Conversation
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.
PR Overview
This PR updates the ignore pattern validation to allow the characters "!", "(", and ")" to be used via the website.
- Updated the regular expression in the ignore pattern schema to include "!", "(", and ")"
- Adjusted the documentation comment to reflect the expanded set of allowed characters
Reviewed Changes
File | Description |
---|---|
website/server/src/schemas/request.ts | Updated regex and its documentation to allow new characters in ignore patterns |
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
website/server/src/schemas/request.ts:5
- Consider adding unit tests to explicitly confirm that patterns containing '!', '(', and ')' are correctly accepted by the regex.
// Allowed characters: alphanumeric, *, ?, /, -, _, ., !, (, ), space, comma
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #396 +/- ##
=======================================
Coverage 90.21% 90.21%
=======================================
Files 72 72
Lines 3484 3484
Branches 755 755
=======================================
Hits 3143 3143
Misses 341 341 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Hi, @eastlondoner ! I've been testing the functionality, but it seems that the After investigation, it appears this is related to limitations in fast-glob's handling of negative ignore patterns: However, I think it's still better for the user experience to allow these characters rather than displaying an error. I'll merge this PR and create a separate issue to track the problem with negative ignore patterns not working as expected. |
thanks! |
@eastlondoner Thank you for your contribution! |
Allow
!
(
and)
in ignorePatterns submitted via the website.These are useful if you want to have a pattern like
!.(cursor)/**
which ignores all dot-prefixed folders in the root except.cursor/
.Checklist
npm run test
npm run lint
Manual test
you can manually test that negations
!
and parentheses()
are not just valid but useful in the ignorePattern using this script: