3

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?

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
Bennett Lynch
  • 554
  • 4
  • 11

1 Answers1

2

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:

  • IDEA-170928 Default inspection profile isn't applied for a new project
CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • doesn't seem to work for me. Looking at https://youtrack.jetbrains.com/issue/IDEA-170928 it should be fixed in 2017.2 but I just downloaded 2017.2 EAP and I open a new project and my though my profile is on automatically on "default", my annotations are empty. This is for project inspections as well as when I edit default settings inspections. Now when I change my project by opening recent project, and there both project and default annotations are filled. I don't get it, why would my DEFAULT settings even differ, looking at them from 2 different projects? It's the IDE defaults, isn't it? :( – BAERUS May 19 '17 at 14:44