Inspection Profile - Do not include new inspections after IDEA update / plugin install
Answered
We have an inspection profile with a carefully selected list of inspections we want enabled. When IDEA updates and adds new inspections, or a plugin that adds inspections is installed, new inspections are automatically added to this inspection profile.
How can we freeze the inspection profile, so that its inspections don't change every time new inspections are added by IDEA updates or plugins?
Please sign in to leave a comment.
Requiring a certain IDEA version and plugins to be installed, when running a specific inspection profile, would also be useful. Or at least having IDEA detect that the inspection profile includes inspections that don't currently exist, and notifying the user. Otherwise developers may run an important inspection profile without all of the necessary inspections, and miss something.
Does it help to enable the option - Settings (
⌘ + ,orCtrl + Alt + S) > Editor > Inspections > Disable new inspections by default?That seems to work, however, IDEA is still trying to re-add all disabled inspections into the inspection profile XML anytime a change is made, which means that anytime IDEA updates and the inspection profile is modified, it will lead to a commit with many unrelated changes in the file.
I reduced the inspection profile XML to only include enabled inspections, so that we can track history of changes in the profile. But when I edit the profile in IDEA, it adds all the other inspections that exist (which depends on IDEA version and plugins) back into the file with enabled="false", which is not necessary because the profile is locked.
Then, is there a solution to the second part of my issue, which would be a warning when an inspection is present in the inspection profile, but does not exist in IDEA because the developer is either using an old version or missing a plugin?
Thank you.
Thank you for the information.
I created a new feature request on our issue tracker: https://youtrack.jetbrains.com/issue/IJPL-244685.
Please vote for it and follow for progress updates.