JetBrains / inspection-plugin

Gradle plugin to launch IDEA inspections
Apache License 2.0
255 stars 27 forks source link

[Discussion] Similarities & share ideas & concepts with idea-cli-inspector #19

Open bentolor opened 5 years ago

bentolor commented 5 years ago

When I started https://github.com/bentolor/idea-cli-inspector there was no other, easy option to leverage the benefits from the IDEA inspections.

My colleague just pointed me toward this project and as an author of the nuts and bolts solution I'm very interested in this plugin.

I have yet not thrown a deep look into this plugin, but I assume that there might be a few concepts and learning from idea-cli-inspector which might be beneficial for this project, too.

A rough idea of how my script works might give the .ideainspect configuration file.

Things I still have no good solution to are:

I'd be very interested in the scope of this project: Can anybody give me a rought outline over the scope, plans, roadmap and priority of this plugin?

mglukhikh commented 5 years ago

@bentolor Please sorry for very late answer. I waited just to understand better the status myself. At this moment development is frozen for a while, but probably we will unfreeze it after some months.

bentolor commented 5 years ago

@mglukhikh Thank you for your feedback!

I really wonder why functionality like this tend to be niche topic in customer visibility. For myself I find it very vital and helpful to leverage IDEA inspections outside interactive usage scenarios.

Nevertheless I'm glad to hear that you currently expect that an unfreeze may be possible in a few months.

3flex commented 5 years ago

There is also https://github.com/arturbosch/detekt which I contribute to.

The primary focus is to be a configurable static analyser for Kotlin, but there is also an extension that allows running IDEA analysis from Gradle. I'd been hoping this project would mature so the IDEA extension could be removed from detekt but it seems that's still some way away.

It would be great to reduce duplication of effort here!

bentolor commented 5 years ago

Thanks for your impulse, @3flex : I stumbled over this feature of detekt a few days ago though I didn't have the chance to get a hands-on experience and asked myself exactly the same issue: does it share the scope?

I don't know about the quality & experiences of detekt nor this plugin, but in my context we still had some stability issues with non-interactively using IDEA inspections on IntelliJ side: Things like

I assume that these issues must be addressed on IntelliJ side and wonder how the TeamCity-expirience is and if it shares the same issues.

It's definitely worth to aim for joined forces!

3flex commented 5 years ago

I'm not sure how much use the IntelliJ extension gets - I've been very active in that project for over a year now and can't recall any issues being raised about it. I've personally never used it, since I use the IDE anyway and only on personal projects so there's no benefit to running headless.

I've done lots of work on the Gradle plugin so I'd be able to contribute here if there's active maintenance, but while development is frozen I'll hold back. My only goal here would be getting to feature parity with detekt. I suspect it's not far off because detekt's integration is quite basic.

mglukhikh commented 5 years ago

Detekt uses mostly its own analyses. It also can run IDEA inspections using IDEA "headless" (no GUI, non-interactive) mode, assuming that IDEA is installed and installation path is provided.

Inspection plugin runs IDEA inspections and does it as a part of Gradle build process. Plugin is able to download given version of IDEA and Kotlin plugin. It runs IDEA using its API and without using command line as detekt does. Effectively it's the same headless mode, with some minor differences.

Unfortunately you are right and non-interactive IDEA run has its problems, for example, inspections may behave a bit differently in this mode. Both ways (detekt and inspection plugin) inherit these problems more or less.

dzwicker commented 4 years ago

I assume that these issues must be addressed on IntelliJ side and wonder how the TeamCity-expirience is and if it shares the same issues.

The TeamCity-expirience has the described problems and is unusable.

silently failing inspections providing no results.

Is a big thing as the build is successful but has just 0 inspection errors/warnings

dzwicker commented 4 years ago

I have created an issue for the silently failing @ jetbrains. Any upvotes would be nice! https://youtrack.jetbrains.com/issue/TW-66570

bentolor commented 4 years ago

@dzwicker Thanks. Upvoted: At least it seems you were able to provide a starting pointer and some assumption. For me it's more or less: "In some constellations it mostly fails, in other it mostly works for unknown reasons".