intellij-ideaprofileinspection

In IntelliJ IDEA, how to set default inspection profile for new projects?


I have a custom, IDE-wide profile for Inspections in IntelliJ IDEA. I'm often creating new projects, and I want to use this profile with them by default.

I tried going to File > Other Settings > Default Settings... and changing Editor > Inspections > Profile to point to my new profile. But when I create a new project, it is still using the Project Default profile.

Is this setting broken? Is my understanding of default project/profile settings not correct?


Solution

  • Inspections from the profile you select as the default are copied to the project default profile when the new project is created. There is an open issue about that:

    Your specific problem is described under ISSUE 5:

    There doesn't seem to be a way to set a global profile as the default for new projects such that the project continues to use the global default. If on the default settings dialog I set my profile to "My Standard Inspections", when I create a new project, the settings I have in "{idea.home}/inspections/My Standard Inspections.xml" are copied to ".idea/inspections/Project_Default.xml". While I can understand this might be desired behavior for teams that want a standard inspection profile used for a project and for it to be shared via VCS, that is not the case for me (and my co-workers). I want a global profile that all my projects use such that as I tweak my inspection profile over time, all projects use the updated profile (as they are using a common global profile). This is the paradigm I've used since IDEA v3. But it's broken down recently because of the reworking of inspection profile management. While I could go in and change the inspection profile from "Project Default" to "My Standard Inspections" each and every time I create a new project, that is a real pain, and is error prone. I think there needs to be an option to select the behavior for the default profile setting to either "Use as a global profile" or "Copy to project default profile".

    We've also created a separate issue for this problem, please follow for updates: