Add checkVersionRequirement

This commit is contained in:
Him188 2020-10-23 13:06:55 +08:00
parent 9adc4cde55
commit ca95add438
2 changed files with 9 additions and 0 deletions

View File

@ -57,6 +57,8 @@ enum class ResolveContextKind {
PLUGIN_NAME,
PLUGIN_VERSION,
VERSION_REQUIREMENT,
COMMAND_NAME,
PERMISSION_NAMESPACE,

View File

@ -108,6 +108,12 @@ class ContextualParametersChecker : DeclarationChecker {
else -> null
}
}
@Suppress("UNUSED_PARAMETER")
fun checkVersionRequirement(inspectionTarget: PsiElement, value: String): Diagnostic? {
// TODO: 2020/10/23 checkVersionRequirement
return null
}
}
private val checkersMap: EnumMap<ResolveContextKind, (declaration: PsiElement, value: String) -> Diagnostic?> =
@ -119,6 +125,7 @@ class ContextualParametersChecker : DeclarationChecker {
put(ResolveContextKind.PERMISSION_NAME, ::checkPermissionName)
put(ResolveContextKind.PERMISSION_NAMESPACE, ::checkPermissionNamespace)
put(ResolveContextKind.PERMISSION_ID, ::checkPermissionId)
put(ResolveContextKind.VERSION_REQUIREMENT, ::checkVersionRequirement)
}
override fun check(