IntelliJ inspections not working after update to 2021.1

Viewed 296

Suddenly the IntelliJ editor inspections have stopped working. The syntax highlighting, the compiler errors and so on are not being shown. The style highlighting works tough.

The inspections in the project navigation tree work and show compilation errors.

gradle build shows compilation errors too.

2 Answers

After updating to IntelliJ 2021.1, the Plugin for Swagger is not compatible anymore. It seems to break the correct display of inspections.

Deinstalling the Plugin for Swagger helps. I was not able to find a better solution which allows me to keep using the Swagger Plugin.

GitHub issue reporting this problem: https://github.com/zalando/intellij-swagger/issues/325

Fun fact: this error popped out as I was trying to code a coding challenge for Zalando, the company which developed the Swagger Plugin :D.

Check idea.log (Help > Show Log in Explorer) for plugin exceptions and update / disable / reinstall the faulty plugin.

If by any chance, someone stumbles upon this answer and is developing with Ktor (with plugin), there's currently an issue that does the same thing as in asked question. If your route method name and route path are the same - the IDE analyzer stops (issue link).

...
fun Route.redirect() {    // <-- same word (redirect) = BAD
    route("/redirect") {  // <-- same word (redirect) = BAD
...

While the bug is being solved, you can just rename the route as a solution.

Related