Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive on indentation with try/catch and typealias #5720

Closed
eygraber opened this issue Jan 23, 2023 · 1 comment
Closed

False positive on indentation with try/catch and typealias #5720

eygraber opened this issue Jan 23, 2023 · 1 comment

Comments

@eygraber
Copy link
Contributor

eygraber commented Jan 23, 2023

With the latest snapshot:

      val failure = try {
        client.newCall(request).execute().closeSilently()
        null
      }
      catch(t: Throwable) {
        t
      }

gets corrected to:

      val failure = try {
        client.newCall(request).execute().closeSilently()
        null
      }
        catch(t: Throwable) {
          t
        }

and

typealias MutableSurveyInterviewResponse =
  HashMap<SurveyInterviewResponseId, SurveyInterviewResponseValue?>

gets corrected to:

typealias MutableSurveyInterviewResponse =
HashMap<SurveyInterviewResponseId, SurveyInterviewResponseValue?>

ktlint 0.48.1 doesn't have this false positive.

Your Environment

  • Version of detekt used: Latest snapshot
  • Version of Gradle used (if applicable): 8.0-rc-1
  • Operating System and version: Ubuntu 22.04
@eygraber
Copy link
Contributor Author

I tested this with the wrong version of ktlint (I had an old one on my path). Filed in ktlint as pinterest/ktlint#1788

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants