mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-27 17:00:14 +08:00
Add checkVersionRequirement
This commit is contained in:
parent
9adc4cde55
commit
ca95add438
@ -57,6 +57,8 @@ enum class ResolveContextKind {
|
|||||||
PLUGIN_NAME,
|
PLUGIN_NAME,
|
||||||
PLUGIN_VERSION,
|
PLUGIN_VERSION,
|
||||||
|
|
||||||
|
VERSION_REQUIREMENT,
|
||||||
|
|
||||||
COMMAND_NAME,
|
COMMAND_NAME,
|
||||||
|
|
||||||
PERMISSION_NAMESPACE,
|
PERMISSION_NAMESPACE,
|
||||||
|
@ -108,6 +108,12 @@ class ContextualParametersChecker : DeclarationChecker {
|
|||||||
else -> null
|
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?> =
|
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_NAME, ::checkPermissionName)
|
||||||
put(ResolveContextKind.PERMISSION_NAMESPACE, ::checkPermissionNamespace)
|
put(ResolveContextKind.PERMISSION_NAMESPACE, ::checkPermissionNamespace)
|
||||||
put(ResolveContextKind.PERMISSION_ID, ::checkPermissionId)
|
put(ResolveContextKind.PERMISSION_ID, ::checkPermissionId)
|
||||||
|
put(ResolveContextKind.VERSION_REQUIREMENT, ::checkVersionRequirement)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun check(
|
override fun check(
|
||||||
|
Loading…
Reference in New Issue
Block a user