For the complete documentation index, see llms.txt. This page is also available as Markdown.

When Konsist API Is Not Enough

You may encounter scenarios where Konsist API is not exposing all of the required information.

As a workaround, you can process the raw declaration text to verify the given declaration:

Konsist
    .scopeFromProject()
    .functions()
    .assertTrue { it.text.contains("return") }

The true logic for determining if the function returns a value is more complex.

This approach is merely a temporary solution. Let us know about your case (Getting Help) to help us improve Konsist APIs.

Last updated