-
Notifications
You must be signed in to change notification settings - Fork 161
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
Real-time scanning doesn't refresh for whitespace characters #513
Comments
👍 |
Thanks for the great report. Bad news - we rely on IDEA for the trigger - I'll double check the integration when I get a moment, but I don't believe there's a lot of option here for fine-tuning. checkstyle-idea/src/main/java/org/infernus/idea/checkstyle/CheckStyleInspection.java Line 55 in 0935367
|
@jshiell I've edited the issue and added debug log output: the trigger seems to be firing, but the check is not reporting any issues ultil a non-whitespace character is added or removed |
Ah, that's more interesting. My guess at first glance is that it could be something to do with the file read - we need to make a copy of the file contents to scan, as Checkstyle needs a static file on disk (and IDEA may not have written changes). If there's something awry with the syncing there on whitespace (e.g. IDEA doesn't flag the change) then we could well end up scanning something unexpected. |
Good news - I finally had a look at it. Bad news - it appears to be an IDEA issue. We return exactly the same I've created an issue with Youtrack - https://youtrack.jetbrains.com/issue/IDEA-265941 |
It turns out there's a scary attribute to turn on whitespace scanning, with the appropriate perf impact. That's now active as of 5.52.0, which should resolve this problem. |
IntelliJ IDEA Ultimate 2020.3
CheckStyle-IDEA 5.46.0
Checkstyle version: 8.36.2
I've chosen Google Checks, but the same happens to custom checkstyle config file.
Simple file as example:
Steps to reproduce:
Looks like the check is not triggered by 'empty' characters (enter, space, tab).
I've recorded a git to show it a bit better.
I've enabled the logging and surprisingly it seems that the checks are being run after adding whitespace characters, but they are not detecting any issues.
The text was updated successfully, but these errors were encountered: