-
Notifications
You must be signed in to change notification settings - Fork 0
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: Fix filename regex #316
fix: Fix filename regex #316
Conversation
mpro7
commented
Jan 6, 2025
- add []{} special characters and improve test
- remove not allowed ? character
- add test for not allowed ? and / characters
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.
One typo, otherwise it looks good, thanks!
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
@@ -13,7 +13,7 @@ final case class AssetFilename private (value: String) extends AnyVal | |||
|
|||
object AssetFilename { | |||
// Allow letters, numbers, underscores, hyphens, spaces, full stops, comma, single quote, apostrophe and braces | |||
private val regex = """^[\p{L}\p{N}_\- .,'`()+=!?<>|]+$""".r | |||
private val regex = """^[\p{L}\p{N}_\- .,'`+=!<>|()\[\]\{\}]+$""".r |
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 think that ()
need to be escaped as well, because they are reserved characters in regex?
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.
They were not escaped before and all tests passed but you might have right.
🤖 I have created a release *beep* *boop* --- ## [0.17.0](v0.16.0...v0.17.0) (2025-01-07) ### Maintenances * Remove deprecated maintenance actions from API ([#314](#314)) ([1150048](1150048)) * Update copyright 2025 ([#312](#312)) ([c372a2b](c372a2b)) ### Enhancements * Show audio files in asset-overview-report seperately (DEV-4490) ([#313](#313)) ([12ea2aa](12ea2aa)) ### Bug Fixes * Fix filename regex ([#316](#316)) ([679c79e](679c79e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).