Probably some way to ask the current file context something like this:
enum class KobwebModuleType {
APPLICATION,
LIBRARY,
WORKER;
}
// WORKER modules don't have access to the UI so many Kobweb actions / inspections are not relevant there
fun KobwebModuleType.isFramework() = this == APPLICATION || this == LIBRARY
fun Module.findKobwebType(): KobwebModuleType() = { /* how do we do this? */ }
// Later, say in UnusedInspectionSuppressor
someContext.module.findKobwebType()?.isFramework() ?: return // Early abort
Probably some way to ask the current file context something like this: