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

Recipe pages with placeholders #327

Merged
merged 6 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 9 additions & 13 deletions docs/recipes/ai/findcommentslanguage.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,20 @@ _Finds all comments and uses AI to predict which language the comment is in._

## Recipe source

[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/java/io/moderne/ai/FindCommentsLanguage.java), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/0.20.1/jar)

* groupId: org.openrewrite.recipe
* artifactId: rewrite-ai-search
* version: 0.20.1
[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/java/io/moderne/ai/FindCommentsLanguage.java), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/)


## Usage

This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-ai-search:0.20.1` in your build file or by running a shell command (in which case no build changes are needed):
This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}` in your build file or by running a shell command (in which case no build changes are needed):
<Tabs groupId="projectType">
<TabItem value="gradle" label="Gradle">

1. Add the following to your `build.gradle` file:

```groovy title="build.gradle"
plugins {
id("org.openrewrite.rewrite") version("6.28.1")
id("org.openrewrite.rewrite") version("{{VERSION_REWRITE_GRADLE_PLUGIN}}")
}

rewrite {
Expand All @@ -43,7 +39,7 @@ repositories {
}

dependencies {
rewrite("org.openrewrite.recipe:rewrite-ai-search:0.20.1")
rewrite("org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}")
}
```

Expand All @@ -59,12 +55,12 @@ initscript {
repositories {
maven { url "https://plugins.gradle.org/m2" }
}
dependencies { classpath("org.openrewrite:plugin:6.28.1") }
dependencies { classpath("org.openrewrite:plugin:{{VERSION_REWRITE_GRADLE_PLUGIN}}") }
}
rootProject {
plugins.apply(org.openrewrite.gradle.RewritePlugin)
dependencies {
rewrite("org.openrewrite.recipe:rewrite-ai-search:0.20.1")
rewrite("org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}")
}
rewrite {
activeRecipe("io.moderne.ai.FindCommentsLanguage")
Expand Down Expand Up @@ -98,7 +94,7 @@ gradle --init-script init.gradle rewriteRun
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>5.46.1</version>
<version>{{VERSION_REWRITE_MAVEN_PLUGIN}}</version>
<configuration>
<exportDatatables>true</exportDatatables>
<activeRecipes>
Expand All @@ -109,7 +105,7 @@ gradle --init-script init.gradle rewriteRun
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-ai-search</artifactId>
<version>0.20.1</version>
<version>{{VERSION_REWRITE_AI_SEARCH}}</version>
</dependency>
</dependencies>
</plugin>
Expand Down Expand Up @@ -138,7 +134,7 @@ mod run . --recipe FindCommentsLanguage

If the recipe is not available locally, then you can install it using:
```shell
mod config recipes jar install org.openrewrite.recipe:rewrite-ai-search:0.20.1
mod config recipes jar install org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}
```
</TabItem>
</Tabs>
Expand Down
22 changes: 9 additions & 13 deletions docs/recipes/ai/fixmisencodedcommentsinfrench.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ _Fixes mis-encoded French comments in your code, javadocs and in your pom.xml fi

## Recipe source

[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/resources/META-INF/rewrite/misencoded-french.yml), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/0.20.1/jar)

* groupId: org.openrewrite.recipe
* artifactId: rewrite-ai-search
* version: 0.20.1
[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/resources/META-INF/rewrite/misencoded-french.yml), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/)

:::info
This recipe is composed of more than one recipe. If you want to customize the set of recipes this is composed of, you can find and copy the GitHub source for the recipe from the link above.
Expand Down Expand Up @@ -56,15 +52,15 @@ recipeList:

## Usage

This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-ai-search:0.20.1` in your build file or by running a shell command (in which case no build changes are needed):
This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}` in your build file or by running a shell command (in which case no build changes are needed):
<Tabs groupId="projectType">
<TabItem value="gradle" label="Gradle">

1. Add the following to your `build.gradle` file:

```groovy title="build.gradle"
plugins {
id("org.openrewrite.rewrite") version("6.28.1")
id("org.openrewrite.rewrite") version("{{VERSION_REWRITE_GRADLE_PLUGIN}}")
}

rewrite {
Expand All @@ -77,7 +73,7 @@ repositories {
}

dependencies {
rewrite("org.openrewrite.recipe:rewrite-ai-search:0.20.1")
rewrite("org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}")
}
```

Expand All @@ -93,12 +89,12 @@ initscript {
repositories {
maven { url "https://plugins.gradle.org/m2" }
}
dependencies { classpath("org.openrewrite:plugin:6.28.1") }
dependencies { classpath("org.openrewrite:plugin:{{VERSION_REWRITE_GRADLE_PLUGIN}}") }
}
rootProject {
plugins.apply(org.openrewrite.gradle.RewritePlugin)
dependencies {
rewrite("org.openrewrite.recipe:rewrite-ai-search:0.20.1")
rewrite("org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}")
}
rewrite {
activeRecipe("io.moderne.ai.FixMisencodedCommentsInFrench")
Expand Down Expand Up @@ -132,7 +128,7 @@ gradle --init-script init.gradle rewriteRun
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>5.46.1</version>
<version>{{VERSION_REWRITE_MAVEN_PLUGIN}}</version>
<configuration>
<exportDatatables>true</exportDatatables>
<activeRecipes>
Expand All @@ -143,7 +139,7 @@ gradle --init-script init.gradle rewriteRun
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-ai-search</artifactId>
<version>0.20.1</version>
<version>{{VERSION_REWRITE_AI_SEARCH}}</version>
</dependency>
</dependencies>
</plugin>
Expand Down Expand Up @@ -172,7 +168,7 @@ mod run . --recipe FixMisencodedCommentsInFrench

If the recipe is not available locally, then you can install it using:
```shell
mod config recipes jar install org.openrewrite.recipe:rewrite-ai-search:0.20.1
mod config recipes jar install org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}
```
</TabItem>
</Tabs>
Expand Down
22 changes: 9 additions & 13 deletions docs/recipes/ai/listallmethodsused.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,20 @@ _List all methods used in any Java source file._

## Recipe source

[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/java/io/moderne/ai/ListAllMethodsUsed.java), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/0.20.1/jar)

* groupId: org.openrewrite.recipe
* artifactId: rewrite-ai-search
* version: 0.20.1
[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/java/io/moderne/ai/ListAllMethodsUsed.java), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/)


## Usage

This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-ai-search:0.20.1` in your build file or by running a shell command (in which case no build changes are needed):
This recipe has no required configuration options. It can be activated by adding a dependency on `org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}` in your build file or by running a shell command (in which case no build changes are needed):
<Tabs groupId="projectType">
<TabItem value="gradle" label="Gradle">

1. Add the following to your `build.gradle` file:

```groovy title="build.gradle"
plugins {
id("org.openrewrite.rewrite") version("6.28.1")
id("org.openrewrite.rewrite") version("{{VERSION_REWRITE_GRADLE_PLUGIN}}")
}

rewrite {
Expand All @@ -43,7 +39,7 @@ repositories {
}

dependencies {
rewrite("org.openrewrite.recipe:rewrite-ai-search:0.20.1")
rewrite("org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}")
}
```

Expand All @@ -59,12 +55,12 @@ initscript {
repositories {
maven { url "https://plugins.gradle.org/m2" }
}
dependencies { classpath("org.openrewrite:plugin:6.28.1") }
dependencies { classpath("org.openrewrite:plugin:{{VERSION_REWRITE_GRADLE_PLUGIN}}") }
}
rootProject {
plugins.apply(org.openrewrite.gradle.RewritePlugin)
dependencies {
rewrite("org.openrewrite.recipe:rewrite-ai-search:0.20.1")
rewrite("org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}")
}
rewrite {
activeRecipe("io.moderne.ai.ListAllMethodsUsed")
Expand Down Expand Up @@ -98,7 +94,7 @@ gradle --init-script init.gradle rewriteRun
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>5.46.1</version>
<version>{{VERSION_REWRITE_MAVEN_PLUGIN}}</version>
<configuration>
<exportDatatables>true</exportDatatables>
<activeRecipes>
Expand All @@ -109,7 +105,7 @@ gradle --init-script init.gradle rewriteRun
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-ai-search</artifactId>
<version>0.20.1</version>
<version>{{VERSION_REWRITE_AI_SEARCH}}</version>
</dependency>
</dependencies>
</plugin>
Expand Down Expand Up @@ -138,7 +134,7 @@ mod run . --recipe ListAllMethodsUsed

If the recipe is not available locally, then you can install it using:
```shell
mod config recipes jar install org.openrewrite.recipe:rewrite-ai-search:0.20.1
mod config recipes jar install org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}
```
</TabItem>
</Tabs>
Expand Down
18 changes: 7 additions & 11 deletions docs/recipes/ai/research/findcodethatresembles.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ _This recipe uses two phase AI approach to find a method invocation that resembl

## Recipe source

[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/java/io/moderne/ai/research/FindCodeThatResembles.java), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/0.20.1/jar)

* groupId: org.openrewrite.recipe
* artifactId: rewrite-ai-search
* version: 0.20.1
[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/java/io/moderne/ai/research/FindCodeThatResembles.java), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/)

## Options

Expand All @@ -42,15 +38,15 @@ recipeList:
k: 5
```

Now that `com.yourorg.FindCodeThatResemblesExample` has been defined, activate it and take a dependency on org.openrewrite.recipe:rewrite-ai-search:0.20.1 in your build file:
Now that `com.yourorg.FindCodeThatResemblesExample` has been defined, activate it and take a dependency on `org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}` in your build file:
<Tabs groupId="projectType">
<TabItem value="gradle" label="Gradle">

1. Add the following to your `build.gradle` file:

```groovy title="build.gradle"
plugins {
id("org.openrewrite.rewrite") version("6.28.1")
id("org.openrewrite.rewrite") version("{{VERSION_REWRITE_GRADLE_PLUGIN}}")
}

rewrite {
Expand All @@ -63,7 +59,7 @@ repositories {
}

dependencies {
rewrite("org.openrewrite.recipe:rewrite-ai-search:0.20.1")
rewrite("org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}")
}
```
2. Run `gradle rewriteRun` to run the recipe.
Expand All @@ -79,7 +75,7 @@ dependencies {
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>5.46.1</version>
<version>{{VERSION_REWRITE_MAVEN_PLUGIN}}</version>
<configuration>
<exportDatatables>true</exportDatatables>
<activeRecipes>
Expand All @@ -90,7 +86,7 @@ dependencies {
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-ai-search</artifactId>
<version>0.20.1</version>
<version>{{VERSION_REWRITE_AI_SEARCH}}</version>
</dependency>
</dependencies>
</plugin>
Expand All @@ -110,7 +106,7 @@ mod run . --recipe FindCodeThatResemblesExample

If the recipe is not available locally, then you can install it using:
```shell
mod config recipes jar install org.openrewrite.recipe:rewrite-ai-search:0.20.1
mod config recipes jar install org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}
```
</TabItem>
</Tabs>
Expand Down
18 changes: 7 additions & 11 deletions docs/recipes/ai/research/getcodeembedding.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ _This recipe calls an AI model to get an embedding for either classes or methods

## Recipe source

[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/java/io/moderne/ai/research/GetCodeEmbedding.java), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/0.20.1/jar)

* groupId: org.openrewrite.recipe
* artifactId: rewrite-ai-search
* version: 0.20.1
[GitHub](https://github.com/openrewrite/rewrite-ai-search/blob/main/src/main/java/io/moderne/ai/research/GetCodeEmbedding.java), [Issue Tracker](https://github.com/openrewrite/rewrite-ai-search/issues), [Maven Central](https://central.sonatype.com/artifact/org.openrewrite.recipe/rewrite-ai-search/)

## Options

Expand All @@ -40,15 +36,15 @@ recipeList:
codeSnippetType: methods
```

Now that `com.yourorg.GetCodeEmbeddingExample` has been defined, activate it and take a dependency on org.openrewrite.recipe:rewrite-ai-search:0.20.1 in your build file:
Now that `com.yourorg.GetCodeEmbeddingExample` has been defined, activate it and take a dependency on `org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}` in your build file:
<Tabs groupId="projectType">
<TabItem value="gradle" label="Gradle">

1. Add the following to your `build.gradle` file:

```groovy title="build.gradle"
plugins {
id("org.openrewrite.rewrite") version("6.28.1")
id("org.openrewrite.rewrite") version("{{VERSION_REWRITE_GRADLE_PLUGIN}}")
}

rewrite {
Expand All @@ -61,7 +57,7 @@ repositories {
}

dependencies {
rewrite("org.openrewrite.recipe:rewrite-ai-search:0.20.1")
rewrite("org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}")
}
```
2. Run `gradle rewriteRun` to run the recipe.
Expand All @@ -77,7 +73,7 @@ dependencies {
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>5.46.1</version>
<version>{{VERSION_REWRITE_MAVEN_PLUGIN}}</version>
<configuration>
<exportDatatables>true</exportDatatables>
<activeRecipes>
Expand All @@ -88,7 +84,7 @@ dependencies {
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-ai-search</artifactId>
<version>0.20.1</version>
<version>{{VERSION_REWRITE_AI_SEARCH}}</version>
</dependency>
</dependencies>
</plugin>
Expand All @@ -108,7 +104,7 @@ mod run . --recipe GetCodeEmbeddingExample

If the recipe is not available locally, then you can install it using:
```shell
mod config recipes jar install org.openrewrite.recipe:rewrite-ai-search:0.20.1
mod config recipes jar install org.openrewrite.recipe:rewrite-ai-search:{{VERSION_REWRITE_AI_SEARCH}}
```
</TabItem>
</Tabs>
Expand Down
Loading
Loading