Skip to content

Commit 8fe912f

Browse files
authored
Add initial generated recipes.csv ahead of customization (#6484)
1 parent b8f9faf commit 8fe912f

File tree

13 files changed

+419
-0
lines changed
  • rewrite-core/src/main/resources/META-INF/rewrite
  • rewrite-gradle/src/main/resources/META-INF/rewrite
  • rewrite-groovy/src/main/resources/META-INF/rewrite
  • rewrite-hcl/src/main/resources/META-INF/rewrite
  • rewrite-java/src/main/resources/META-INF/rewrite
  • rewrite-json/src/main/resources/META-INF/rewrite
  • rewrite-kotlin/src/main/resources/META-INF/rewrite
  • rewrite-maven/src/main/resources/META-INF/rewrite
  • rewrite-properties/src/main/resources/META-INF/rewrite
  • rewrite-test/src/main/resources/META-INF/rewrite
  • rewrite-toml/src/main/resources/META-INF/rewrite
  • rewrite-xml/src/main/resources/META-INF/rewrite
  • rewrite-yaml/src/main/resources/META-INF/rewrite

13 files changed

+419
-0
lines changed

rewrite-core/src/main/resources/META-INF/rewrite/recipes.csv

Lines changed: 32 additions & 0 deletions
Large diffs are not rendered by default.

rewrite-gradle/src/main/resources/META-INF/rewrite/recipes.csv

Lines changed: 83 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ecosystem,packageName,name,displayName,description,recipeCount,category1,category2
2+
maven,org.openrewrite:rewrite-groovy,org.openrewrite.groovy.format.AutoFormat,Format Groovy code,Format Groovy code using a standard comprehensive set of Groovy formatting recipes.,1,Format,Groovy
3+
maven,org.openrewrite:rewrite-groovy,org.openrewrite.groovy.format.GStringCurlyBraces,Groovy GString curly braces,"In Groovy [GStrings](https://docs.groovy-lang.org/latest/html/api/groovy/lang/GString.html), curly braces are optional for single variable expressions. This recipe adds them, so that the expression is always surrounded by curly braces.",1,Format,Groovy
4+
maven,org.openrewrite:rewrite-groovy,org.openrewrite.groovy.format.OmitParenthesesForLastArgumentLambda,Move a closure which is the last argument of a method invocation out of parentheses,Groovy allows a shorthand syntax that allows a closure to be placed outside of parentheses.,1,Format,Groovy
5+
maven,org.openrewrite:rewrite-groovy,org.openrewrite.groovy.format.OmitParenthesesFormat,Stylize Groovy code to omit parentheses,Omit parentheses for last argument lambdas in Groovy code.,1,Format,Groovy
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
ecosystem,packageName,name,displayName,description,recipeCount,category1,category2,options
2+
maven,org.openrewrite:rewrite-hcl,org.openrewrite.hcl.DeleteContent,Delete content,Delete HCL content by path.,1,,Hcl,"[{""name"":""contentPath"",""type"":""String"",""displayName"":""Content path"",""description"":""A JSONPath expression specifying the block to delete."",""example"":""$.provider"",""required"":true}]"
3+
maven,org.openrewrite:rewrite-hcl,org.openrewrite.hcl.ReplaceLegacyAttributeIndexSyntax,Replace legacy attribute index syntax,Replace legacy attribute index syntax (`.0`) with the new syntax (`[0]`).,1,,Hcl,
4+
maven,org.openrewrite:rewrite-hcl,org.openrewrite.hcl.MoveContentToFile,Move content to another file,"Move content to another HCL file, deleting it in the original file.",1,,Hcl,"[{""name"":""contentPath"",""type"":""String"",""displayName"":""Content path"",""description"":""A JSONPath expression specifying the block to move."",""example"":""$.provider"",""required"":true},{""name"":""fromPath"",""type"":""String"",""displayName"":""From path"",""description"":""The source path of the file from which content is being moved."",""example"":""from.tf"",""required"":true},{""name"":""destinationPath"",""type"":""String"",""displayName"":""To path"",""description"":""The source path of the file to move the content to."",""example"":""to.tf"",""required"":true}]"
5+
maven,org.openrewrite:rewrite-hcl,org.openrewrite.hcl.format.AutoFormat,Format HCL code,Format HCL code using a standard comprehensive set of HCL formatting recipes.,1,Format,Hcl,
6+
maven,org.openrewrite:rewrite-hcl,org.openrewrite.hcl.format.BlankLines,Blank lines,Add and/or remove blank lines.,1,Format,Hcl,
7+
maven,org.openrewrite:rewrite-hcl,org.openrewrite.hcl.format.NormalizeFormat,Normalize format,Move whitespace to the outermost LST element possible.,1,Format,Hcl,
8+
maven,org.openrewrite:rewrite-hcl,org.openrewrite.hcl.format.RemoveTrailingWhitespace,Remove trailing whitespace,Remove any extra trailing whitespace from the end of each line.,1,Format,Hcl,
9+
maven,org.openrewrite:rewrite-hcl,org.openrewrite.hcl.format.Spaces,Spaces,Format whitespace in HCL code.,1,Format,Hcl,
10+
maven,org.openrewrite:rewrite-hcl,org.openrewrite.hcl.format.TabsAndIndents,Tabs and indents,Format tabs and indents in HCL code.,1,Format,Hcl,
11+
maven,org.openrewrite:rewrite-hcl,org.openrewrite.hcl.search.FindAndReplaceLiteral,Find and replace literals in HCL files,"Find and replace literal values in HCL files. This recipe parses the source files on which it runs as HCL, meaning you can execute HCL language-specific recipes before and after this recipe in a single recipe run.",1,Search,Hcl,"[{""name"":""find"",""type"":""String"",""displayName"":""Find"",""description"":""The literal to find (and replace)"",""example"":""blacklist"",""required"":true},{""name"":""replace"",""type"":""String"",""displayName"":""Replace"",""description"":""The replacement literal for `find`. This snippet can be multiline."",""example"":""denylist""},{""name"":""regex"",""type"":""Boolean"",""displayName"":""Regex"",""description"":""Default false. If true, `find` will be interpreted as a Regular Expression, and capture group contents will be available in `replace`.""},{""name"":""caseSensitive"",""type"":""Boolean"",""displayName"":""Case sensitive"",""description"":""If `true` the search will be sensitive to case. Default `false`.""}]"
12+
maven,org.openrewrite:rewrite-hcl,org.openrewrite.hcl.search.FindContent,Find content,Find HCL content by path.,1,Search,Hcl,"[{""name"":""contentPath"",""type"":""String"",""displayName"":""Content path"",""description"":""A JSONPath expression specifying the block to find."",""example"":""$.provider"",""required"":true}]"

rewrite-java/src/main/resources/META-INF/rewrite/recipes.csv

Lines changed: 99 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ecosystem,packageName,name,displayName,description,recipeCount,category1,category2,category1Description,category2Description,options
2+
maven,org.openrewrite:rewrite-json,org.openrewrite.json.AddKeyValue,Add value to JSON Object,"Adds a `value` at the specified `keyPath` with the specified `key`, if the key doesn't already exist.",1,,JSON,,Basic building blocks for transforming JSON.,"[{""name"":""keyPath"",""type"":""String"",""displayName"":""Key path"",""description"":""A JsonPath expression to locate the *parent* JSON entry."",""example"":""'$.subjects.*' or '$.' or '$.x[1].y.*' etc."",""required"":true},{""name"":""key"",""type"":""String"",""displayName"":""Key"",""description"":""The key to create."",""example"":""myKey"",""required"":true},{""name"":""value"",""type"":""String"",""displayName"":""Value"",""description"":""The value to add to the document at the specified key. Can be of any type representing JSON value. String values should be quoted to be inserted as Strings."",""example"":""`\""myValue\""` or `{\""a\"": 1}` or `[ 123 ]`"",""required"":true},{""name"":""prepend"",""type"":""Boolean"",""displayName"":""Prepend"",""description"":""If set to `true` the value will be added to the beginning of the object""}]"
3+
maven,org.openrewrite:rewrite-json,org.openrewrite.json.ChangeKey,Change key,"Change a JSON mapping entry key, while leaving the value intact.",1,,JSON,,Basic building blocks for transforming JSON.,"[{""name"":""oldKeyPath"",""type"":""String"",""displayName"":""Old key path"",""description"":""A [JsonPath](https://docs.openrewrite.org/reference/jsonpath-and-jsonpathmatcher-reference) expression to locate a JSON entry."",""example"":""$.subjects.kind"",""required"":true},{""name"":""newKey"",""type"":""String"",""displayName"":""New key"",""description"":""The new name for the key selected by oldKeyPath."",""example"":""kind"",""required"":true}]"
4+
maven,org.openrewrite:rewrite-json,org.openrewrite.json.ChangeValue,Change value,Change a JSON mapping entry value leaving the key intact.,1,,JSON,,Basic building blocks for transforming JSON.,"[{""name"":""oldKeyPath"",""type"":""String"",""displayName"":""Key path"",""description"":""A [JsonPath](https://docs.openrewrite.org/reference/jsonpath-and-jsonpathmatcher-reference) expression to locate a JSON entry."",""example"":""$.subjects.kind"",""required"":true},{""name"":""value"",""type"":""String"",""displayName"":""New value"",""description"":""The new JSON value to set for the key identified by oldKeyPath."",""example"":""'Deployment'"",""required"":true}]"
5+
maven,org.openrewrite:rewrite-json,org.openrewrite.json.DeleteKey,Delete key,Delete a JSON mapping entry key.,1,,JSON,,Basic building blocks for transforming JSON.,"[{""name"":""keyPath"",""type"":""String"",""displayName"":""Key path"",""description"":""A [JsonPath](https://docs.openrewrite.org/reference/jsonpath-and-jsonpathmatcher-reference) expression to locate a JSON entry."",""example"":""$.subjects.kind"",""required"":true}]"
6+
maven,org.openrewrite:rewrite-json,org.openrewrite.json.CopyValue,Copy JSON value,Copies a JSON value from one key to another. The existing key/value pair remains unaffected by this change. Attempts to create the new key if it does not exist.,1,,JSON,,Basic building blocks for transforming JSON.,"[{""name"":""sourceKeyPath"",""type"":""String"",""displayName"":""Source key path"",""description"":""A [JSONPath](https://www.rfc-editor.org/rfc/rfc9535.html) expression to locate a JSON value to copy."",""example"":""$.source.kind"",""required"":true},{""name"":""sourceFilePath"",""type"":""String"",""displayName"":""Source file path"",""description"":""The file path to the JSON file to copy the value from. If `null` then the value will be copied from any JSON file it appears within."",""example"":""src/main/resources/application.json""},{""name"":""destinationKeyPath"",""type"":""String"",""displayName"":""Destination key path"",""description"":""A [JSONPath](https://www.rfc-editor.org/rfc/rfc9535.html) expression to locate the *parent* JSON entry."",""example"":""'$.subjects.*' or '$.' or '$.x[1].y.*' etc."",""required"":true},{""name"":""destinationKey"",""type"":""String"",""displayName"":""Destination key"",""description"":""The key to create."",""example"":""myKey"",""required"":true},{""name"":""destinationFilePath"",""type"":""String"",""displayName"":""Destination file path"",""description"":""The file path to the JSON file to copy the value to. If `null` then the value will be copied only into the same file it was found in."",""example"":""src/main/resources/application.json""}]"
7+
maven,org.openrewrite:rewrite-json,org.openrewrite.json.CreateJsonFile,Create JSON file,Create a new JSON file.,1,,JSON,,Basic building blocks for transforming JSON.,"[{""name"":""relativeFileName"",""type"":""String"",""displayName"":""Relative file path"",""description"":""File path of new file."",""example"":""foo/bar/baz.json"",""required"":true},{""name"":""fileContents"",""type"":""String"",""displayName"":""File contents"",""description"":""Multiline text content for the file."",""example"":""{\""a\"": {\""property\"": \""value\""}, \""another\"": {\""property\"": \""value\""}}""},{""name"":""fileContentsUrl"",""type"":""String"",""displayName"":""File contents URL"",""description"":""URL to file containing text content for the file. Use either `fileContents` or `fileContentsUrl` option."",""example"":""http://foo.bar/baz.json""},{""name"":""overwriteExisting"",""type"":""Boolean"",""displayName"":""Overwrite existing file"",""description"":""If there is an existing file, should it be overwritten.""}]"
8+
maven,org.openrewrite:rewrite-json,org.openrewrite.json.format.AutoFormat,Format JSON,Format JSON code using a standard comprehensive set of JSON formatting recipes.,1,Format,JSON,,Basic building blocks for transforming JSON.,
9+
maven,org.openrewrite:rewrite-json,org.openrewrite.json.format.Indents,JSON indent,Format tabs and indents in JSON.,1,Format,JSON,,Basic building blocks for transforming JSON.,
10+
maven,org.openrewrite:rewrite-json,org.openrewrite.json.format.WrappingAndBraces,JSON new lines,Split members into separate lines in JSON.,1,Format,JSON,,Basic building blocks for transforming JSON.,
11+
maven,org.openrewrite:rewrite-json,org.openrewrite.json.search.FindKey,Find JSON object members,Find JSON object members by JsonPath expression.,1,Search,JSON,,Basic building blocks for transforming JSON.,"[{""name"":""key"",""type"":""String"",""displayName"":""Key path"",""description"":""A JsonPath expression used to find matching keys."",""example"":""$.subjects.kind"",""required"":true}]"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
ecosystem,packageName,name,displayName,description,recipeCount,category1,category2,category1Description,category2Description,options,dataTables
2+
maven,org.openrewrite:rewrite-kotlin,org.openrewrite.kotlin.FindKotlinSources,Find Kotlin sources and collect data metrics,Use data table to collect source files types and counts of files with extensions `.kt`.,1,,Kotlin,,Recipes to search and transform Kotlin.,"[{""name"":""markCompilationUnits"",""type"":""Boolean"",""displayName"":""Find Kotlin compilation units"",""description"":""Limit the search results to Kotlin CompilationUnits.""}]","[{""name"":""org.openrewrite.kotlin.table.KotlinSourceFile"",""displayName"":""Kotlin source files"",""description"":""Kotlin sources present in LSTs on the SAAS."",""columns"":[{""name"":""sourcePath"",""type"":""String"",""displayName"":""Source path before the run"",""description"":""The source path of the file before the run.""},{""name"":""sourceFileType"",""type"":""SourceFileType"",""displayName"":""Source file type"",""description"":""The source file type that was created.""}]}]"
3+
maven,org.openrewrite:rewrite-kotlin,org.openrewrite.kotlin.OrderImports,Order Kotlin imports,"Groups and orders import statements. If a [style has been defined](https://docs.openrewrite.org/concepts-and-explanations/styles), this recipe will order the imports according to that style. If no style is detected, this recipe will default to ordering imports in the same way that IntelliJ IDEA does.",1,,Kotlin,,Recipes to search and transform Kotlin.,,
4+
maven,org.openrewrite:rewrite-kotlin,org.openrewrite.kotlin.RenameTypeAlias,Rename type alias,Change the name of a given type alias.,1,,Kotlin,,Recipes to search and transform Kotlin.,"[{""name"":""aliasName"",""type"":""String"",""displayName"":""Old alias name"",""description"":""Name of the alias type."",""example"":""OldAlias"",""required"":true},{""name"":""newName"",""type"":""String"",""displayName"":""New alias name"",""description"":""Name of the alias type."",""example"":""NewAlias"",""required"":true},{""name"":""fullyQualifiedAliasedType"",""type"":""String"",""displayName"":""Target fully qualified type"",""description"":""Fully-qualified class name of the aliased type."",""example"":""org.junit.Assume"",""required"":true}]",
5+
maven,org.openrewrite:rewrite-kotlin,org.openrewrite.kotlin.cleanup.EqualsMethodUsage,Structural equality tests should use `==` or `!=`,"In Kotlin, `==` means structural equality and `!=` structural inequality and both map to the left-side term’s `equals()` function. It is, therefore, redundant to call `equals()` as a function. Also, `==` and `!=` are more general than `equals()` and `!equals()` because it allows either of both operands to be `null`.
6+
Developers using `equals()` instead of `==` or `!=` is often the result of adapting styles from other languages like Java, where `==` means reference equality and `!=` means reference inequality.
7+
The `==` and `!=` operators are a more concise and elegant way to test structural equality than calling a function.",1,Cleanup,Kotlin,,Recipes to search and transform Kotlin.,,
8+
maven,org.openrewrite:rewrite-kotlin,org.openrewrite.kotlin.cleanup.ImplicitParameterInLambda,`it` shouldn't be used as a lambda parameter name,"`it` is a special identifier that allows you to refer to the current parameter being passed to a lambda expression without explicitly naming the parameter. Lambda expressions are a concise way of writing anonymous functions. Many lambda expressions have only one parameter, when this is true the compiler can determine the parameter type by context. Thus when using it with single parameter lambda expressions, you do not need to declare the type.",1,Cleanup,Kotlin,,Recipes to search and transform Kotlin.,,
9+
maven,org.openrewrite:rewrite-kotlin,org.openrewrite.kotlin.cleanup.RemoveLambdaArgumentParentheses,Remove method invocation parentheses around single lambda argument,"For example, convert `1.let({ it + 1 })` to `1.let { it + 1 }`.",1,Cleanup,Kotlin,,Recipes to search and transform Kotlin.,,
10+
maven,org.openrewrite:rewrite-kotlin,org.openrewrite.kotlin.cleanup.RemoveTrailingComma,Remove trailing comma in Kotlin,"Remove trailing commas in variable, parameter, and class property lists.",1,Cleanup,Kotlin,,Recipes to search and transform Kotlin.,,
11+
maven,org.openrewrite:rewrite-kotlin,org.openrewrite.kotlin.cleanup.RemoveTrailingSemicolon,Remove unnecessary trailing semicolon,"Some Java programmers may mistakenly add semicolons at the end when writing Kotlin code, but in reality, they are not necessary.",1,Cleanup,Kotlin,,Recipes to search and transform Kotlin.,,
12+
maven,org.openrewrite:rewrite-kotlin,org.openrewrite.kotlin.cleanup.ReplaceCharToIntWithCode,Replace `Char#toInt()` with `Char#code`,Replace the usage of the deprecated `Char#toInt()` with `Char#code`. Please ensure that your Kotlin version is 1.5 or later to support the `Char#code` property. Note that the current implementation does not perform a Kotlin version check.,1,Cleanup,Kotlin,,Recipes to search and transform Kotlin.,,
13+
maven,org.openrewrite:rewrite-kotlin,org.openrewrite.kotlin.cleanup.UnnecessaryTypeParentheses,Remove unnecessary parentheses on Kotlin types,"In Kotlin, it's possible to add redundant nested parentheses in type definitions. This recipe is designed to remove those unnecessary parentheses.",1,Cleanup,Kotlin,,Recipes to search and transform Kotlin.,,
14+
maven,org.openrewrite:rewrite-kotlin,org.openrewrite.kotlin.format.AutoFormat,Format Kotlin code,Format Kotlin code using a standard comprehensive set of Kotlin formatting recipes.,1,Format,Kotlin,,Recipes to search and transform Kotlin.,,

0 commit comments

Comments
 (0)