-
Notifications
You must be signed in to change notification settings - Fork 42
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
Flaky results: Same rule produces different results (Root cause: regexp not getting parsed) #57
Comments
I'm trying to find a minimal repro. It's not easily reproduced in isolation. Could you explain what do you mean by "regexp not getting parsed"? Flaky usually means that you get different results from time to time. Does this issue happen only once in a while? Based on the screenshot provided, I'm seeing that |
Basically,
Yes, sometimes it gets parsed properly but then other lines show error. Main question is, why is |
In order to understand why it happens, I need to reproduce it. I'll try finding the minimal repro. |
Thanks! Please tell me if any more info/help required from me regarding this. |
|
|
Thank you! This is helpful indeed. |
Seeing this issue in other cases also. Example, My rules:
|
Please feel free to modify the issue title if you think the root cause is something else. Although, I wonder why someone else did not report this error. This seems to be a big blocker. Is it because I am using [email protected] ? |
Another thing is error happens on the exact same lines, so that is deterministic. Even if I edit the file, it happens in that line of code again. |
Yet another speculation is it happens with same string (in this case). For example, in current run I faced error in two files: First file with: This specific string got replaced by |
Sorry for not fixing this for quite a long time. I'm having busy weeks on my work. :( Thank you for your collaboration and patience. ❤️ |
No issues. <3 |
I see what's the problem there. Before I believe it still makes sense to keep messages somewhat limited (you can match a huge statement with a pattern), but do a full replacement for the replacement suggestions that are used in I'm planning this fix:
|
It does make sense to truncate output when printing the suggestions to the stdout. It's bad if we try to apply the truncated suggestions to a file though, it leads to a broken syntax with meta variables inserted instead of the actual replacements. 1. For the command-line output, increase the width limit to 60 (instead of 40). 2. When applying -fix suggestions, ignore the width limit. Fixes #57 Signed-off-by: Iskander Sharipov <[email protected]>
It does make sense to truncate output when printing the suggestions to the stdout. It's bad if we try to apply the truncated suggestions to a file though, it leads to a broken syntax with meta variables inserted instead of the actual replacements. 1. For the command-line output, increase the width limit to 60 (instead of 40). 2. When applying -fix suggestions, ignore the width limit. Fixes #57 Signed-off-by: Iskander Sharipov <[email protected]>
Wow, great catch! Thanks a lot!! @quasilyte |
@quasilyte Will this fix be available in v0.1.2, or just in master? |
I released v0.1.3 which includes this fix. |
Thanks! |
My rules:
Results:
The text was updated successfully, but these errors were encountered: