-
Notifications
You must be signed in to change notification settings - Fork 0
RemoveUnusedImports #1
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
Changes from all commits
170476f
daa1be5
fa768d8
3ee6f40
52967ab
7e41b90
b5008dc
467293d
1e28daa
219d261
d56715c
1b39a3c
567da6e
085a752
4f98d3a
b5a7802
65e0dd1
910aeda
a92a8dd
f9320db
ee2cf5a
34ed4d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| /* | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * | ||
| * The OpenSearch Contributors require contributions made to | ||
| * this file be licensed under the Apache-2.0 license or a | ||
| * compatible open source license. | ||
| * | ||
| * Modifications Copyright OpenSearch Contributors. See | ||
| * GitHub history for details. | ||
| */ | ||
|
|
||
| /* | ||
| * Licensed to Elasticsearch under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch licenses this file to you 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 | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * 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. | ||
| */ | ||
|
|
||
| import org.opensearch.gradle.BuildPlugin | ||
|
|
||
| /** | ||
| * # - org.openrewrite.staticanalysis.ModifierOrder | ||
| # | ||
| # - org.openrewrite.java.format.RemoveTrailingWhitespace | ||
| # - org.openrewrite.java.recipes.JavaRecipeBestPractices | ||
| # - org.openrewrite.java.recipes.RecipeNullabilityBestPractices | ||
| # - org.openrewrite.java.recipes.RecipeTestingBestPractices | ||
| # - org.openrewrite.staticanalysis.EqualsAvoidsNull | ||
| # - org.openrewrite.staticanalysis.JavaApiBestPractices | ||
| # - org.openrewrite.staticanalysis.MissingOverrideAnnotation | ||
| # - org.openrewrite.staticanalysis.RemoveUnusedLocalVariables | ||
| # - org.openrewrite.staticanalysis.RemoveUnusedPrivateFields | ||
| # - org.openrewrite.staticanalysis.StringLiteralEquality | ||
| # - org.openrewrite.staticanalysis.WrappingAndBraces | ||
| # - org.openrewrite.text.EndOfLineAtEndOfFile | ||
| */ | ||
| allprojects { | ||
| plugins.withType(BuildPlugin).whenPluginAdded { | ||
| project.apply plugin: "org.openrewrite.rewrite" | ||
| rewrite { | ||
| activeRecipe("org.opensearch.openrewrite.recipe.CodeCleanup") | ||
| configFile = file("$rootDir/gradle/rewrite.yml") | ||
| exclusions.add("**OpenSearchTestCaseTests.java") | ||
| exclusions.add("**AbstractBenchmark.java") | ||
| exclusions.add("**ScriptClassPathResolutionContext.java") | ||
| exclusions.add("**StarTreeMapper.java") | ||
| failOnDryRunResults = true | ||
| } | ||
| repositories { | ||
| mavenCentral() | ||
| } | ||
| dependencies { | ||
| rewrite("org.openrewrite.recipe:rewrite-rewrite:0.9.0") | ||
| rewrite("org.openrewrite.recipe:rewrite-static-analysis:2.12.0") | ||
| } | ||
| tasks { | ||
| rewriteDryRun { | ||
| dependsOn(check) | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| type: specs.openrewrite.org/v1beta/recipe | ||
| name: org.opensearch.openrewrite.recipe.CodeCleanup | ||
| displayName: CodeCleanup | ||
| description: Automatically cleanup code, e.g. remove unnecessary parentheses, simplify expressions. | ||
| recipeList: | ||
| - org.openrewrite.java.RemoveUnusedImports | ||
| # - org.openrewrite.staticanalysis.RemoveUnusedPrivateMethods | ||
| # - org.openrewrite.java.format.RemoveTrailingWhitespace | ||
| # - org.openrewrite.staticanalysis.EmptyBlock | ||
| # - org.openrewrite.staticanalysis.RemoveCallsToSystemGc | ||
| # - org.openrewrite.staticanalysis.RemoveUnusedLocalVariables | ||
| # - org.openrewrite.staticanalysis.RemoveUnusedPrivateFields | ||
| # - org.openrewrite.staticanalysis.UnnecessaryThrows |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try remove this