mirror of https://github.com/apache/lucene.git
LUCENE-9881: synchronize ECJ linter with Eclipse IDE (#46)
Co-authored-by: Uwe Schindler <uschindler@apache.org>
This commit is contained in:
parent
f02799c511
commit
690e256ec9
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import org.apache.tools.ant.filters.ReplaceTokens;
|
||||
import org.gradle.plugins.ide.eclipse.model.SourceFolder
|
||||
import org.gradle.plugins.ide.eclipse.model.ClasspathEntry
|
||||
|
||||
|
@ -73,11 +74,24 @@ configure(rootProject) {
|
|||
}
|
||||
|
||||
eclipseJdt {
|
||||
def errorMode = project.propertyOrDefault('eclipse.errors','warning');
|
||||
def ecjLintFile = rootProject.file('gradle/validation/ecj-lint/ecj.javadocs.prefs');
|
||||
|
||||
inputs.file(ecjLintFile)
|
||||
inputs.property('errorMode', errorMode)
|
||||
|
||||
doLast {
|
||||
def ecjLintConfig = ecjLintFile.getText('UTF-8')
|
||||
.replaceAll(/=error\b/, '=' + errorMode)
|
||||
project.sync {
|
||||
from rootProject.file("${resources}/dot.settings")
|
||||
into rootProject.file(".settings")
|
||||
filter(ReplaceTokens, tokens: [
|
||||
'ecj-lint-config': ecjLintConfig
|
||||
])
|
||||
filteringCharset = 'UTF-8'
|
||||
}
|
||||
logger.lifecycle('Eclipse config written with ECJ errors configured as {}. Change by passing -Peclipse.errors=ignore/warning/error.', errorMode)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
#Fri Dec 31 10:26:16 EST 2010
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
|
|
|
@ -1,46 +1,6 @@
|
|||
#Sun Sep 23 13:02:27 EDT 2012
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
||||
org.eclipse.jdt.core.compiler.compliance=11
|
||||
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
|
||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=error
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||
org.eclipse.jdt.core.compiler.source=11
|
||||
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
|
||||
org.eclipse.jdt.core.compiler.taskPriorities=HIGH
|
||||
org.eclipse.jdt.core.compiler.taskTags=nocommit
|
||||
@ecj-lint-config@
|
||||
|
||||
# Note: all compiler flags are defined in ECJ linter configuration
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
|
||||
|
|
|
@ -23,7 +23,11 @@ org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
|
|||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
|
||||
# TODO: disabled by default: seems productive but there are currently cleanups/exceptions
|
||||
org.eclipse.jdt.core.compiler.problem.deadCode=ignore
|
||||
# deprecation warnings disabled by default:
|
||||
# as a library we expose, support, and test deprecated APIs/impls
|
||||
# deprecated classes might need to be touched by non-deprecated code (e.g. test framework)
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
|
@ -64,6 +68,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
|
|||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
# disabled by default: lucene does not support object serialization
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
|
||||
|
@ -72,7 +77,7 @@ org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
|||
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=error
|
||||
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=error
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
|
||||
|
@ -81,6 +86,7 @@ org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariable
|
|||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
|
||||
# TODO: generics-related warning that is normally enabled by default
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=error
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
|
||||
|
@ -90,18 +96,22 @@ org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
|||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=error
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
|
||||
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=error
|
||||
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=error
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
|
||||
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
|
||||
# TODO: resource-related warning that is normally disabled by default
|
||||
# this analysis gets confused by some IOUtils method, maybe there is an improvement possible?
|
||||
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||
# TODO: normally enabled by default: warns of unrecognized SuppressWarnings token
|
||||
# some SuppressWarnings are used for other tools.
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=error
|
||||
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
|
||||
|
@ -109,7 +119,7 @@ org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=error
|
|||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=error
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||
|
@ -125,7 +135,12 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di
|
|||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
|
||||
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
|
||||
# TODO: normally enabled by default: warns of unnecessary SuppressedWarnings token
|
||||
# some SuppressWarnings are used for other tools
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=11
|
||||
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
|
||||
org.eclipse.jdt.core.compiler.taskPriorities=HIGH
|
||||
org.eclipse.jdt.core.compiler.taskTags=nocommit
|
||||
|
|
Loading…
Reference in New Issue