org.jetbrains.kotlin.fir.analysis.checkers.CommonDeclarationCheckers.kt Maven / Gradle / Ivy
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.fir.analysis.checkers
import org.jetbrains.kotlin.fir.analysis.cfa.AbstractFirPropertyInitializationChecker
import org.jetbrains.kotlin.fir.analysis.cfa.FirCallsEffectAnalyzer
import org.jetbrains.kotlin.fir.analysis.cfa.FirPropertyInitializationAnalyzer
import org.jetbrains.kotlin.fir.analysis.checkers.cfa.FirControlFlowChecker
import org.jetbrains.kotlin.fir.analysis.checkers.declaration.*
import org.jetbrains.kotlin.fir.analysis.checkers.expression.FirAnonymousFunctionParametersChecker
import org.jetbrains.kotlin.fir.analysis.checkers.declaration.FirFiniteBoundRestrictionChecker
import org.jetbrains.kotlin.fir.analysis.checkers.syntax.*
object CommonDeclarationCheckers : DeclarationCheckers() {
override val basicDeclarationCheckers: Set
get() = setOf(
FirModifierChecker,
FirConflictsDeclarationChecker,
FirProjectionRelationChecker,
FirTypeConstraintsChecker,
FirReservedUnderscoreDeclarationChecker,
FirUpperBoundViolatedDeclarationChecker,
FirInfixFunctionDeclarationChecker,
FirExposedVisibilityDeclarationChecker,
FirCyclicTypeBoundsChecker,
FirExpectActualDeclarationChecker,
FirAmbiguousAnonymousTypeChecker,
FirExplicitApiDeclarationChecker,
FirAnnotationChecker,
FirPublishedApiChecker,
FirOptInMarkedDeclarationChecker,
FirExpectConsistencyChecker,
)
override val classLikeCheckers: Set
get() = setOf(
FirExpectActualClassifiersAreInBetaChecker,
)
override val callableDeclarationCheckers: Set
get() = setOf(
FirKClassWithIncorrectTypeArgumentChecker,
FirImplicitNothingReturnTypeChecker,
FirDynamicReceiverChecker,
FirActualCallableDeclarationChecker,
)
override val functionCheckers: Set
get() = setOf(
FirContractChecker,
FirFunctionParameterChecker,
FirFunctionReturnChecker,
FirInlineDeclarationChecker,
FirSuspendLimitationsChecker,
)
override val simpleFunctionCheckers: Set
get() = setOf(
FirFunctionNameChecker,
FirFunctionTypeParametersSyntaxChecker,
FirOperatorModifierChecker,
FirTailrecFunctionChecker,
FirMemberFunctionsChecker,
FirDataObjectContentChecker,
ContractSyntaxV2FunctionChecker,
FirTopLevelFunctionsChecker,
)
override val propertyCheckers: Set
get() = setOf(
FirInapplicableLateinitChecker,
FirDestructuringDeclarationChecker,
FirConstPropertyChecker,
FirPropertyAccessorsTypesChecker,
FirPropertyTypeParametersChecker,
FirInitializerTypeMismatchChecker,
FirDelegatedPropertyChecker,
FirPropertyFieldTypeChecker,
FirPropertyFromParameterChecker,
FirLocalVariableTypeParametersSyntaxChecker,
FirDelegateUsesExtensionPropertyTypeParameterChecker,
FirTopLevelPropertiesChecker,
FirLocalExtensionPropertyChecker,
ContractSyntaxV2PropertyChecker,
FirVolatileAnnotationChecker,
FirInlinePropertyChecker,
)
override val backingFieldCheckers: Set
get() = setOf(
FirExplicitBackingFieldForbiddenChecker,
FirExplicitBackingFieldsUnsupportedChecker,
)
override val classCheckers: Set
get() = setOf(
FirOverrideChecker,
FirNotImplementedOverrideChecker,
FirNotImplementedOverrideSimpleEnumEntryChecker,
FirThrowableSubclassChecker,
FirOpenMemberChecker,
FirClassVarianceChecker,
FirSealedSupertypeChecker,
FirMemberPropertiesChecker,
FirImplementationMismatchChecker,
FirTypeParametersInObjectChecker,
FirSupertypesChecker,
FirPrimaryConstructorSuperTypeChecker,
FirDynamicSupertypeChecker,
FirEnumCompanionInEnumConstructorCallChecker,
)
override val regularClassCheckers: Set
get() = setOf(
FirAnnotationClassDeclarationChecker,
FirOptInAnnotationClassChecker,
FirCommonConstructorDelegationIssuesChecker,
FirDelegationSuperCallInEnumConstructorChecker,
FirDelegationInInterfaceSyntaxChecker,
FirEnumClassSimpleChecker,
FirLocalEntityNotAllowedChecker,
FirManyCompanionObjectsChecker,
FirMethodOfAnyImplementedInInterfaceChecker,
FirDataClassPrimaryConstructorChecker,
FirFunInterfaceDeclarationChecker,
FirNestedClassChecker,
FirValueClassDeclarationChecker,
FirOuterClassArgumentsRequiredChecker,
FirPropertyInitializationChecker,
FirDelegateFieldTypeMismatchChecker,
FirFiniteBoundRestrictionChecker,
)
override val constructorCheckers: Set
get() = setOf(
FirConstructorAllowedChecker,
)
override val fileCheckers: Set
get() = setOf(
FirImportsChecker,
FirUnresolvedInMiddleOfImportChecker,
)
override val controlFlowAnalyserCheckers: Set
get() = setOf(
FirCallsEffectAnalyzer,
)
override val variableAssignmentCfaBasedCheckers: Set
get() = setOf(
FirPropertyInitializationAnalyzer,
)
override val typeParameterCheckers: Set
get() = setOf(
FirTypeParameterBoundsChecker,
FirTypeParameterVarianceChecker,
FirReifiedTypeParameterChecker,
FirTypeParameterSyntaxChecker,
)
override val typeAliasCheckers: Set
get() = setOf(
FirTopLevelTypeAliasChecker,
FirActualTypeAliasChecker,
FirActualTypealiasToSpecialAnnotationChecker,
FirTypeAliasExpandsToArrayOfNothingsChecker,
)
override val anonymousFunctionCheckers: Set
get() = setOf(
FirAnonymousFunctionParametersChecker,
FirAnonymousFunctionSyntaxChecker,
)
override val anonymousInitializerCheckers: Set
get() = setOf(
FirAnonymousInitializerInInterfaceChecker
)
override val valueParameterCheckers: Set
get() = setOf(
FirValueParameterDefaultValueTypeMismatchChecker,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy