does `hasAnnotationOf` work on meta-annotations?
# konsist
e
does
hasAnnotationOf
work on meta-annotations?
seems like no, because
KoAnnotationDeclaration
doesn't implement itself
this is working
Copy code
@Test
    fun `konsist test rest functions have @PreAuthorize annotation`() {
        controllers
            .functions()
            .assertTrue {
                it.hasAnnotationOf<PreAuthorize>() || it.annotations
                    .filterNot { annotation -> annotation.name == "Suppress" }
                    .any { annotation ->
                        val clazz = Class.forName(annotation.fullyQualifiedName)
                        clazz.isAnnotationPresent<PreAuthorize>()
                    }
            }
    }