JetBrains / inspection-plugin

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

Why is an .ipr file generated? #8

Open ayedo opened 6 years ago

ayedo commented 6 years ago

First of all, thanks for your great work!

Everytime I run the inspects a .ipr file is generated in my root project folder.

I am using the .idea based project structure, which I prefer.

Why is the .ipr file generated, and how could I suppress it?

mglukhikh commented 6 years ago

Please sorry, at this moment it's not possible :( We are planning to change the order how projects are imported by inspection plugin, and after that ipr and other project files will not be created at all. But it's not quite easy. The thing I probably can do easily is to delete ipr and other plugin-created stuff after it finished work. So anyway let's keep this issue, it will be fixed in some way.

ayedo commented 6 years ago

Thanks for your reply!

It would be nice, if the plugin cleaned up these project files :)

I have a different issue. I do not want to depend on the idea based xml file for the inspections. You mention that it is possible to set individual inspections. I created a list with all inspections from the xml file, but the plugin crashes with the message, that it cannot find the inspections. Here is the list: error('org.jetbrains.kotlin.idea.inspections.GradleKotlinxCoroutines- Deprecation') error('org.jetbrains.kotlin.idea.inspections.KotlinInternalInJava') error('org.jetbrains.kotlin.idea.inspections.KotlinInvalidBundleOr- Property') error('org.jetbrains.kotlin.idea.inspections.MavenCoroutinesDep- recation') error('org.jetbrains.kotlin.idea.inspections.ObsoleteExperimentalCo- routines') warning('org.jetbrains.kotlin.idea.inspections.CanBeParameter') warning('org.jetbrains.kotlin.idea.inspections.CanBePrimaryConstruc- torProperty') warning('org.jetbrains.kotlin.idea.inspections.CanBeVal') warning('org.jetbrains.kotlin.idea.inspections.ConflictingExtension- Property') warning('org.jetbrains.kotlin.idea.inspections.ConvertSecondaryCons- tructorToPrimary') warning('org.jetbrains.kotlin.idea.inspections.DataClassPrivateCon- structor') warning('org.jetbrains.kotlin.idea.inspections.DeferredResultUnused- ') warning('org.jetbrains.kotlin.idea.inspections.DeprecatedGradleDe- pendency') warning('org.jetbrains.kotlin.idea.inspections.DeprecatedMavenDe- pendency') warning('org.jetbrains.kotlin.idea.inspections.DestructuringW- rongName') warning('org.jetbrains.kotlin.idea.inspections.DifferentKotlinGradl- eVersion') warning('org.jetbrains.kotlin.idea.inspections.DifferentKotlinMave- nVersion') warning('org.jetbrains.kotlin.idea.inspections.DifferentMavenStdli- bVersion') warning('org.jetbrains.kotlin.idea.inspections.DifferentStdlibGradl- eVersion') warning('org.jetbrains.kotlin.idea.inspections.EmptyRange') warning('org.jetbrains.kotlin.idea.inspections.EqualsOrHashCode') warning('org.jetbrains.kotlin.idea.inspections.ExplicitThis') warning('org.jetbrains.kotlin.idea.inspections.FakeJvmFieldConstant- ') warning('org.jetbrains.kotlin.idea.inspections.JavaCollectionsStati- cMethodOnImmutableList') warning('org.jetbrains.kotlin.idea.inspections.KDocUnresolvedR- eference') warning('org.jetbrains.kotlin.idea.inspections.KotlinDeprecation') warning('org.jetbrains.kotlin.idea.inspections.KotlinMavenPlu- ginPhase') warning('org.jetbrains.kotlin.idea.inspections.KotlinTestJUnit') warning('org.jetbrains.kotlin.idea.inspections.KotlinUnusedImport') warning('org.jetbrains.kotlin.idea.inspections.LeakingThis') warning('org.jetbrains.kotlin.idea.inspections.MainFunctionRe- turnUnit') warning('org.jetbrains.kotlin.idea.inspections.MigrateDiagnosticSup- pression') warning('org.jetbrains.kotlin.idea.inspections.NestedLambdaShadowed- ImplicitParameter') warning('org.jetbrains.kotlin.idea.inspections.OverridingDeprecat- edMember') warning('org.jetbrains.kotlin.idea.inspections.PackageDirectory- Mismatch') warning('org.jetbrains.kotlin.idea.inspections.PlatformExtensionRec- eiverOfInline') warning('org.jetbrains.kotlin.idea.inspections.RecursiveEqualsCall') warning('org.jetbrains.kotlin.idea.inspections.RecursiveProperty- Accessor') warning('org.jetbrains.kotlin.idea.inspections.RedundantCompanionR- eference') warning('org.jetbrains.kotlin.idea.inspections.RedundantExplicitTyp- e') warning('org.jetbrains.kotlin.idea.inspections.RedundantModality- Modifier') warning('org.jetbrains.kotlin.idea.inspections.RedundantSamCon- structor') warning('org.jetbrains.kotlin.idea.inspections.RedundantSemicolon') warning('org.jetbrains.kotlin.idea.inspections.RedundantSuspend- Modifier') warning('org.jetbrains.kotlin.idea.inspections.RedundantUnitEx- pression') warning('org.jetbrains.kotlin.idea.inspections.RedundantUnitRe- turnType') warning('org.jetbrains.kotlin.idea.inspections.RedundantVisibility- Modifier') warning('org.jetbrains.kotlin.idea.inspections.RemoveForLoopIndices- ') warning('org.jetbrains.kotlin.idea.inspections.RemoveRedundantB- ackticks') warning('org.jetbrains.kotlin.idea.inspections.RemoveRedundantCalls- OfConversionMethods') warning('org.jetbrains.kotlin.idea.inspections.RemoveRedundantSprea- dOperator') warning('org.jetbrains.kotlin.idea.inspections.RemoveSetterParam- eterType') warning('org.jetbrains.kotlin.idea.inspections.RemoveSingleExpressi- onStringTemplate') warning('org.jetbrains.kotlin.idea.inspections.ReplaceArrayEquality- OpWithArraysEquals') warning('org.jetbrains.kotlin.idea.inspections.ReplaceSingleLineLet- ') warning('org.jetbrains.kotlin.idea.inspections.SelfAssignment') warning('org.jetbrains.kotlin.idea.inspections.UnusedEquals') warning('org.jetbrains.kotlin.idea.inspections.UnusedLambdaExpres- sionBody') warning('org.jetbrains.kotlin.idea.inspections.UnusedReceiverP- arameter') warning('org.jetbrains.kotlin.idea.inspections.UnusedSymbol') warning('org.jetbrains.kotlin.idea.inspections.UselessCallOnCo- llection') warning('org.jetbrains.kotlin.idea.inspections.UselessCallOnNotNull- ')

On Tue, Oct 23, 2018, at 8:35 AM, Mikhail Glukhikh wrote:

Please sorry, at this moment it's not possible :( We are planning to change the order how projects are imported by inspection plugin, and after that ipr and other project files will not be created at all. But it's not quite easy. The thing I probably can do easily is to delete ipr and other plugin-created stuff after it finished work. So anyway let's keep this issue, it will be fixed in some way.> — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub[1], or mute the thread[2].

Links:

  1. https://github.com/JetBrains/inspection-plugin/issues/8#issuecomment-432112476
  2. https://github.com/notifications/unsubscribe-auth/AEhSlu1Hgx9ueGbBdayJjRaWPEdY5mRXks5unriugaJpZM4XwVj2
mglukhikh commented 6 years ago

@ayedo I created separate #10 about this

mglukhikh commented 6 years ago

@ayedo In this case you should add the suffix Inspection to all names. See README. E.g.

warning('org.jetbrains.kotlin.idea.inspections.ConvertSecondaryConstructorToPrimaryInspection')