Search code examples
intellij-ideacode-inspection

Inspecting code on a non-java IntelliJ IDEA project


I'm using IntelliJ IDEA to build a non-java project, it is just a PHP + Javascript project, everything is working just fine but when I try to Inspect all the code in the project (Analyze -> Inspect Code) I get an error:

The JDK is not configured properly for this project. Inspection cannot proceed.

Am I doing something wrong? Do I have to configure an SDK even though the project is not java?

Note: The automatic code inspection for working files opened in the editor is working fine, the only problem is when I try to inspec all the code in the project.

Note 2: I cannot use PHPStorm neither Webstorm.

Thanks.


Solution

  • I raised this over at https://youtrack.jetbrains.com/issue/IDEA-188017 - after some back and forth, the Jetbrains employee helped me figure out that I had a Java module in there.

    If you are not using Java, please crate a module of a Static Web type. Now you have a module of a Java type, that is why the error is reported, so such behaviour is expected.

    Delete your Java module. Once you enter in the menu in the screenshot below, find the Static Web type and create your module like that.

    enter image description here