如何为 OpenRewrite 定义样式以重新排序导入(OrderImports)

问题描述 投票:0回答:1

我正在寻找示例 rewrite.yml -文件以使用 org.openrewrite.java.OrderImports-plugin 来定义导入语句的自定义排序。

我搜索了所有文档和互联网 - 但没有成功 - 然而......;-)

java openrewrite
1个回答
0
投票

给你:

type: specs.openrewrite.org/v1beta/recipe
name: org.myUser.MyRecipe
displayName: My custom recipe
description: Fix all the things.
recipeList:
  - org.openrewrite.java.OrderImports

这是使用 Moderne 配方生成器的https://app.moderne.io/recipes/builder
然后使用 https://app.moderne.io/recipes/org.openrewrite.java.OrderImports

中的“添加到构建器”
© www.soinside.com 2019 - 2024. All rights reserved.