-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into java-template-id
- Loading branch information
Showing
1,029 changed files
with
44,520 additions
and
26,990 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: comment-pr | ||
|
||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow | ||
on: | ||
workflow_run: | ||
workflows: ["receive-pr"] | ||
types: | ||
- completed | ||
|
||
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ | ||
# Since this pull request has write permissions on the target repo, we should **NOT** execute any untrusted code. | ||
jobs: | ||
post-suggestions: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
uses: openrewrite/gh-automation/.github/workflows/comment-pr.yml@main |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Dependency Submission | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["publish"] | ||
types: | ||
- completed | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
dependency-submission: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
- name: Generate and submit dependency graph | ||
uses: gradle/actions/dependency-submission@v3 | ||
env: | ||
# Exclude all dependencies that originate solely in the 'buildSrc' project | ||
DEPENDENCY_GRAPH_EXCLUDE_PROJECTS: ':buildSrc' | ||
# Exclude dependencies that are only resolved in test classpaths | ||
DEPENDENCY_GRAPH_EXCLUDE_CONFIGURATIONS: '.*[Tt]est(Compile|Runtime)Classpath' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: receive-pr | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: '${{ github.workflow }} @ ${{ github.ref }}' | ||
cancel-in-progress: true | ||
|
||
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ | ||
# Since this pull request receives untrusted code, we should **NOT** have any secrets in the environment. | ||
jobs: | ||
upload-patch: | ||
uses: openrewrite/gh-automation/.github/workflows/receive-pr.yml@main | ||
with: | ||
recipe: 'org.openrewrite.recipes.OpenRewriteBestPracticesSubset' | ||
rewrite_yml: | | ||
--- | ||
type: specs.openrewrite.org/v1beta/recipe | ||
name: org.openrewrite.recipes.OpenRewriteBestPracticesSubset | ||
displayName: OpenRewrite best practices | ||
description: Best practices for OpenRewrite recipe development. | ||
recipeList: | ||
- org.openrewrite.recipes.JavaRecipeBestPracticesSubset | ||
- org.openrewrite.recipes.RecipeTestingBestPracticesSubset | ||
- org.openrewrite.recipes.RecipeNullabilityBestPracticesSubset | ||
#- org.openrewrite.java.OrderImports | ||
- org.openrewrite.java.format.EmptyNewlineAtEndOfFile | ||
- org.openrewrite.staticanalysis.InlineVariable | ||
- org.openrewrite.staticanalysis.MissingOverrideAnnotation | ||
- org.openrewrite.staticanalysis.UseDiamondOperator | ||
--- | ||
type: specs.openrewrite.org/v1beta/recipe | ||
name: org.openrewrite.recipes.JavaRecipeBestPracticesSubset | ||
displayName: Java Recipe best practices | ||
description: Best practices for Java recipe development. | ||
preconditions: | ||
- org.openrewrite.java.search.FindTypes: | ||
fullyQualifiedTypeName: org.openrewrite.Recipe | ||
checkAssignability: true | ||
recipeList: | ||
- org.openrewrite.java.recipes.BlankLinesAroundFieldsWithAnnotations | ||
- org.openrewrite.java.recipes.ExecutionContextParameterName | ||
- org.openrewrite.java.recipes.MissingOptionExample | ||
- org.openrewrite.java.recipes.RecipeEqualsAndHashCodeCallSuper | ||
- org.openrewrite.java.recipes.UseTreeRandomId | ||
- org.openrewrite.staticanalysis.NeedBraces | ||
#- org.openrewrite.staticanalysis.RemoveSystemOutPrintln | ||
--- | ||
type: specs.openrewrite.org/v1beta/recipe | ||
name: org.openrewrite.recipes.RecipeTestingBestPracticesSubset | ||
displayName: Recipe testing best practices | ||
description: Best practices for testing recipes. | ||
preconditions: | ||
- org.openrewrite.java.search.FindTypes: | ||
fullyQualifiedTypeName: org.openrewrite.test.RewriteTest | ||
checkAssignability: true | ||
recipeList: | ||
- org.openrewrite.java.recipes.RewriteTestClassesShouldNotBePublic | ||
#- org.openrewrite.java.recipes.SelectRecipeExamples | ||
- org.openrewrite.java.recipes.SourceSpecTextBlockIndentation | ||
- org.openrewrite.java.testing.cleanup.RemoveTestPrefix | ||
- org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic | ||
- org.openrewrite.staticanalysis.NeedBraces | ||
- org.openrewrite.staticanalysis.RemoveSystemOutPrintln | ||
--- | ||
type: specs.openrewrite.org/v1beta/recipe | ||
name: org.openrewrite.recipes.RecipeNullabilityBestPracticesSubset | ||
displayName: Recipe nullability best practices | ||
description: Use OpenRewrite internal nullability annotations; drop JetBrains annotations; use `package-info.java` instead. | ||
recipeList: | ||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: org.jetbrains.annotations.Nullable | ||
newFullyQualifiedTypeName: org.openrewrite.internal.lang.Nullable | ||
- org.openrewrite.java.ChangeType: | ||
oldFullyQualifiedTypeName: jakarta.annotation.Nullable | ||
newFullyQualifiedTypeName: org.openrewrite.internal.lang.Nullable | ||
- org.openrewrite.java.RemoveAnnotation: | ||
annotationPattern: '@org.jetbrains.annotations.NotNull' | ||
- org.openrewrite.java.RemoveAnnotation: | ||
annotationPattern: '@jakarta.annotation.Nonnull' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# 5. Parser and LST Design Conventions and Best Practices | ||
|
||
## Status | ||
|
||
Draft | ||
|
||
## Context | ||
|
||
As we have developed parsers for more programming languages and data formats a number of conventions and best practices | ||
have emerged. This document is intended to capture and codify those conventions and best practices. | ||
|
||
## Decision | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.