-
Notifications
You must be signed in to change notification settings - Fork 2
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
Empty group/unclosed group with non-capturing group #4
Comments
Regex is valid. What version of PhpStorm do you use? (I have 8.0.3 and there is no "Empty group" or "Unclosed group" inspection errors for your code snippet.) Do you use a 3rdparty regex inspection plugin? |
Using 8.0.3. As far as I'm aware, this is the only inspection plugin I'm using. Full plugin list: If I disable PHP RegExp Support and restart PhpStorm, the errors go away. |
Just disabled a bunch of the plugins to see if they were causing it. New plugin list: CSS Support, Database Tools and SQL, File Watchers, Framework MVC Structure Support, HTML Tools, PHP, PHP RegExp Support Most of those are JetBrains plugins. I can still reproduce the issue with just the plugins above. |
Could you run "Inspect code" and look at what inspection generates this error (e.g. General/Annotator, etc.). |
I've submitted version 0.9.2 to JetBrains plugins directory, and it will be available after moderation. Could you check this issue with new version? PS. I'm still unable to reproduce this issue locally. |
What is codepage of the file? From screenshot it looks like length of regex is 6 characters instead of 13 ones, so maybe codepage is UTF16 and it isn't processed correctly by the plugin (though it's unlikely as UTF16 is internal Java codepage and should be processed in the same manner as ASCII). |
The file does not include a byte order mark. The relevant part of the file is encoded as:
A minimum reproducible example is available at: https://github.com/lol768/lol768/releases/tag/v1 The bottom right status bar tells me the file is being read using UTF-8: Platform info:
|
Code sample:
IDE:
Regex101 output:
As far as I'm aware, the regex is valid. It works in production & when testing locally. Am I doing something wrong or is this a bug?
The text was updated successfully, but these errors were encountered: