Function names enclosed in backticks are throwing a "function naming" exception
takanuva15 opened this issue · 1 comments
I have a few Kotlin test classes in this repo which contain function names enclosed in backticks. According to the ktlint documentation, function names enclosed in backticks should be excluded from the standard:function-naming
ruleset:
function names enclosed between backticks do not need to adhere to the normal naming convention
However, with the latest plugin version, when I open a file with backticked function-names, it's throwing an error saying I need to fix it:
Is this a plugin error? Or an issue with ktlint itself?
Not a plugin, and not a ktlint error. The full quote is:
Functions in files which import a class from package io.kotest, junit.framework, kotlin.test, org.junit, or org.testng are considered to be test functions. Functions in such classes are allowed to have underscores in the name. Also, function names enclosed between backticks do not need to adhere to the normal naming convention.
Your example class does not contain an import from one of the packages io.kotest, junit.framework, kotlin.test, org.junit, or org.testng. So this class can not be recognized as being a test class.