rust-lang / rust-lang/rust-bindgen
Case-insensitive regexes were useful
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 829
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 15
Description
I think case insensitivity (unicode-case) was useful:
--allowlist-item '(?i)(aaa|bbb).*' used to work for e.g. AAA_CONST, and bbb_func()
Now it (silently 😲) matches nothing.
As a workaround, it looks like for my case I can use --allowlist-item '(?i-u:aaa|bbb).*', which turns on case insensitivity, and turns off unicode matching for my literal prefixes.
Originally posted by @Dr-Emann in https://github.com/rust-lang/rust-bindgen/issues/2702#issuecomment-1940389007
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported allowlist behavior with --allowlist-item '(?i)(aaa|bbb).*' and compare it with the (?i-u:aaa|bbb).* workaround. Identify the regex handling path and add coverage showing that the original case-insensitive pattern matches names such as AAA_CONST and bbb_func().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100