-
Notifications
You must be signed in to change notification settings - Fork 354
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 xslt-transformations
- Loading branch information
Showing
57 changed files
with
2,087 additions
and
233 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
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 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,68 @@ | ||
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.RecipeNullabilityBestPractices | ||
#- 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 |
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
31 changes: 31 additions & 0 deletions
31
rewrite-core/src/main/java/org/openrewrite/NlsRewrite.java
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,31 @@ | ||
/* | ||
* Copyright 2024 the original author or authors. | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* <p> | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.openrewrite; | ||
|
||
import org.jetbrains.annotations.Nls; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Target; | ||
|
||
public class NlsRewrite { | ||
@Target({ElementType.TYPE_USE, ElementType.PARAMETER, ElementType.METHOD}) | ||
public @Nls(capitalization = Nls.Capitalization.Sentence) @interface DisplayName { | ||
} | ||
|
||
@Target({ElementType.TYPE_USE, ElementType.PARAMETER, ElementType.METHOD}) | ||
public @Nls(capitalization = Nls.Capitalization.Sentence) @interface Description { | ||
} | ||
} |
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
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.