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

CodeCleanup: Compilation failure using as-statement SimpleAssociation<*, *> #446

Open
punkratz312 opened this issue Jan 16, 2025 · 1 comment
Labels
bug Something isn't working parser-kotlin

Comments

@punkratz312
Copy link
Contributor

run: org.openrewrite.staticanalysis.CodeCleanup

https://docs.openrewrite.org/recipes/staticanalysis/codecleanup#usage

checkout: https://github.com/xmolecules/jmolecules.git

diff:
Image

@punkratz312 punkratz312 added the bug Something isn't working label Jan 16, 2025
@punkratz312 punkratz312 changed the title Compilation failure using as-statement SimpleAssociation<*, *> CodeCleanup: Compilation failure using as-statement SimpleAssociation<*, *> Jan 16, 2025
@timtebeek timtebeek moved this to Backlog in OpenRewrite Jan 16, 2025
@timtebeek
Copy link
Contributor

Thanks @punkratz312 ! It'd be great if you could include the snippet just above that shows which recipe made that exact change, as CodeCleanup is again a composite of multiple recipes:

name: org.openrewrite.staticanalysis.CodeCleanup
displayName: Code cleanup
description: Automatically cleanup code, e.g. remove unnecessary parentheses, simplify expressions.
recipeList:
- org.openrewrite.staticanalysis.DefaultComesLast
- org.openrewrite.staticanalysis.EmptyBlock
- org.openrewrite.java.format.EmptyNewlineAtEndOfFile
- org.openrewrite.staticanalysis.ForLoopControlVariablePostfixOperators
- org.openrewrite.staticanalysis.FinalizePrivateFields
- org.openrewrite.java.format.MethodParamPad
- org.openrewrite.java.format.NoWhitespaceAfter
- org.openrewrite.java.format.NoWhitespaceBefore
- org.openrewrite.java.format.PadEmptyForLoopComponents
- org.openrewrite.staticanalysis.TypecastParenPad
- org.openrewrite.staticanalysis.EqualsAvoidsNull
- org.openrewrite.staticanalysis.ExplicitInitialization
- org.openrewrite.staticanalysis.FallThrough
- org.openrewrite.staticanalysis.HideUtilityClassConstructor
- org.openrewrite.staticanalysis.NeedBraces
- org.openrewrite.staticanalysis.OperatorWrap
- org.openrewrite.staticanalysis.UnnecessaryParentheses
- org.openrewrite.staticanalysis.ReplaceThreadRunWithThreadStart
- org.openrewrite.staticanalysis.ChainStringBuilderAppendCalls
- org.openrewrite.staticanalysis.ReplaceStringBuilderWithString
- org.openrewrite.java.ShortenFullyQualifiedTypeReferences

That should give us some indication of whether to look at a particular recipe, or perhaps generically at rewrite-kotlin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser-kotlin
Projects
Status: Backlog
Development

No branches or pull requests

2 participants