Home > coding, intellij, java > My current IntelliJ code inspections profile for Java projects

My current IntelliJ code inspections profile for Java projects

I recently exported my IntelliJ code inspections profile for Java projects from IntelliJ Community Edition to share it with whoever might be interested.

These highly customized code inspections are based on industry standards like the official Java code conventions, various best practices from the Java community and my experience over many years as Java developer and team lead, trying to ensure code quality and maintainability.

Feel free to download and save it as a local XML file. Then you can import it into any of your IntelliJ projects via Analyze – Inspect Code – Inspection profile – […] button – Import:

Advertisements
Categories: coding, intellij, java
  1. David W
    October 7, 2014 at 10:21

    Are you able to provide any information on the correct format of an xml file to be used for successfully importing a profile into intellij? I am trying to import an xml of sonar rules, which contain custom severity levels and colors for those levels. I can successfully import the actual rules themselves, but cannot also successfully import their associated severity levels and colors. Any help is greatly appreciated.

    • October 8, 2014 at 09:05

      Hi David, thanks for contributing to the discussions on my blog.

      I have only used code inspections profile xml files that were exported from IntelliJ itself. I have not manually edited or created such files.

      I am also looking for ways to convert between xml formats of wide-spread Open Source tools – like PMD, Checkstyle, Sonar, etc. – and the Intellij format. My Google searches have not discovered anything that would help me with those conversions.

      To investigate the Intellij rule format, I would 1) try to find the closest approximation of the desired rules via IntelliJ code inspections UI. Then click the “Share” checkbox on that UI dialog and observe the file that IntelliJ creates in .idea/inspectionProfiles. 2) Make a backup copy of that xml file. 3) Then make some edits to the relevant rules. 4) Do a diff between the resulting xml file and your backup.

    • October 8, 2014 at 09:10

      Did you use this plugin?
      https://github.com/sonar-intellij-plugin/sonar-intellij-plugin

      If so then you might have to report an issue here (check first the existing ones):
      https://github.com/sonar-intellij-plugin/sonar-intellij-plugin/issues

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: