Closed zhangbutao closed 1 month ago
Hi - I fear I can't reproduce this. When I add your config file and click next, it correctly shows the config_loc property. As long as I set it it works correctly.
Are you not seeing this panel, or is it empty, or something else?
@jshiell Hi, I mean that the Code Style is not ok. You can try to import the checkstyle file in Code Style tool. It will encounter error.
Oh, sorry - thanks for clarifying. I'll try have a look this weekend.
don't work on 5.94.0 and work on 5.93.4
I'm pretty sure I know why this is occurring. Previously, we would just stub out the properties when doing this and return an empty string for each. Unfortunately this broke other configs that expected enums (e.g. severity) or used default
properties, in particular the latest bundled google_checks rules (which is why we had to fix it for Checkstyle 10.18 support).
I have a couple ideas of how to fix it - e.g. returning empty strings for properties that are value of a value, or removing elements that rely on properties before parsing the file - but they're all going to be a bit involved. As such, it's pretty unlikely to get fixed this week due to other commitments (primarily work travel).
In the meantime, you should be able to (clumsily) work-around it by removing the properties temporarily for import.
No worry. I am using a low version CheckStyle-IDEA-5.92.0 now. It works well. @jshiell Thanks for your good plugin!!!
I've got a potential fix - you can find the patched version here if you're willing to test it 🙏
The testing is pretty cursory and there's no way I'm going to release it just before being AFK for a week. Will try and get it tested & released next weekend, all being well.
Thanks for the fix! Will test the patched version in one or two days.
I've got a potential fix - you can find the patched version here if you're willing to test it 🙏
The testing is pretty cursory and there's no way I'm going to release it just before being AFK for a week. Will try and get it tested & released next weekend, all being well.
I tested the patched version against Intellij2024.2.1. The Code Style & CheckStyle tools are both work fine. So I think the fix is good. Thanks very much!!!
Thank you for your report and your help in fixing this - it's always greatly appreciated! I'll get this released now.
latest IntelliJ IDEA 2024.2.1 + CheckStyle-IDEA 5.94.1
I can add the checkstyle file into checkstyle plugin:
But Error will encounter when i apply the checkstyle file to Code Style: And the Idea error log shows that Property ${config_loc} has not been set in my checkstyle file.
But i can not set Property ${config_loc} when importing checkstyle configuration in the Code Style operation. @jshiell Could you guide me how to fix this issue? BTW, The low version CheckStyle-IDEA-5.86.0 & CheckStyle-IDEA-5.92.0 can apply checkstyle file into Code Style sucessufully. Do you think this issue be related this change https://github.com/jshiell/checkstyle-idea/commit/b62c2f056b21aea1f059947115478f331b71943d?
Here is my checkstyle file: checkstyle.txt
Thanks in advance!