Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Custom IDE inspections without plugins

Custom IDE inspections without plugins

Avatar for Alexander Levin

Alexander Levin

June 26, 2021
Tweet

More Decks by Alexander Levin

Other Decks in Programming

Transcript

  1. About me • Senior Software Engineer • Mostly JVM dev,

    sometimes JS/TS • Assisting in Kotlin Telegram Community • Came from Norilsk • Living in Berlin
  2. Agenda • Why? • Check example project • Naive approach

    • Less naive approach • What is Structural Search and Replace? (SSR) • SSR Inspections • Sharing your results
  3. Example project Our scenario: • Java project • Tests are

    migrating to Kotlin • Mockito -> Mockito Kotlin • Junit5 -> kotlin.test
  4. Structural Search and Replace (SSR) • Regexes are nice but

    they are working with text • SSR is taking syntax/semantics into account • Java/Kotlin are covered • Scala is not :(
  5. Stuff done so far (update) • SSRs • SSR Inspections

    • Export/Import functionality of SSR • Saving SSR inspections in the repo • Saving SSR inspection in the separate repo • Adding settings repo
  6. Summary • SSR is cool • Sometimes prior knowledge is

    still needed • Not everything is smooth • Still easier comparing to writing custom plugins/inspections