Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
cache: maven

Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
java temurin-17.0.15+6
java temurin-21.0.9+10.0.LTS
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Rename recipe `io.github.mhagnumdw.FormatSqlBlockRecipe` to `io.github.mhagnumdw.recipes.FormatSqlTextBlockByAnnotation`
- Rename recipe `io.github.mhagnumdw.FormatSqlFileRecipe` to `io.github.mhagnumdw.recipes.FormatSqlFile`

### Changed

- Migrate test source code to JDK 21

### Fixed

- **FormatSqlFile**: Preserves the trailing newline of the file
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you have an idea for a new feature or an improvement to an existing one, plea

## Development

This project uses Java 8 for the main source and Java 17 for the test source. When importing into Eclipse as a Maven project, you need to manually change to Java 17: `right-click on the project > Build Path > Configure Build Path... > Libraries`, remove Java 8 and add Java 17 using the `Add Library...` button.
This project uses Java 8 for the main source and Java 21 for the test source. When importing into Eclipse as a Maven project, you need to manually change to Java 21: `right-click on the project > Build Path > Configure Build Path... > Libraries`, remove Java 8 and add Java 21 using the `Add Library...` button.

To test in the real environment during development, just install the JAR and reference the SNAPSHOT version:

Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ A set of [OpenRewrite](https://docs.openrewrite.org/) recipes for formatting SQL
- [Usage](#usage)
- [Configuring in `pom.xml`](#configuring-in-pomxml)
- [Without adding anything to the project](#without-adding-anything-to-the-project)
- [Compatibility](#compatibility)
- [Changelog](#changelog)
- [For Developers](#for-developers)

## Recipes
Expand Down Expand Up @@ -256,6 +258,16 @@ Then run:
> - `io.github.mhagnumdw.recipes.FormatSqlCustomConfig` is the `name` defined in the `rewrite.yml` file.
> - For a single recipe, you don't even need to have the `rewrite.yml` file to customize the configuration, see [here](https://docs.openrewrite.org/reference/faq#is-it-possible-to-pass-arguments-to-a-recipe-from-the-command-line).

## Compatibility

These recipes are compatible with Java projects version 8 or higher.

> _**For developers**: The project requires JDK 21 to compile and run tests, but uses Java 8 for the recipes (src/main/java). More information in [CONTRIBUTING.md](CONTRIBUTING.md)._

## Changelog

For a detailed list of changes, please see our [CHANGELOG.md](CHANGELOG.md) file.

## For Developers

For details on how to contribute, set up the development environment, run tests, and other development-related information, please see our [CONTRIBUTING.md](CONTRIBUTING.md) file.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<properties>
<maven.compiler.release>8</maven.compiler.release>
<maven.compiler.testRelease>17</maven.compiler.testRelease>
<maven.compiler.testRelease>21</maven.compiler.testRelease>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.organization>mhagnumdw</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
Expand Down Expand Up @@ -83,7 +83,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.38</version>
<version>1.18.46</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -111,7 +111,7 @@
</dependency>
<dependency>
<groupId>org.openrewrite</groupId>
<artifactId>rewrite-java-17</artifactId>
<artifactId>rewrite-java-21</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -161,7 +161,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.13</version>
<version>0.8.14</version>
<executions>
<execution>
<id>default-prepare-agent</id>
Expand Down