Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore invalid function names when importing from "junit.framework" #2386

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Ignore invalid function names when importing from "junit.framework"
Closes #2383
  • Loading branch information
paul-dingemans committed Nov 27, 2023
commit fae9e3123feecf94c8dff07ed705a24702ab15b7
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ public class FunctionNamingRule :
private val TEST_LIBRARIES_SET =
setOf(
"io.kotest",
"junit.framework",
"kotlin.test",
"org.junit",
"org.testng",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,4 +257,18 @@ class FunctionNamingRuleTest {
""".trimIndent()
functionNamingRuleAssertThat(code).hasNoLintViolations()
}

@Test
fun `Issue 2383 - Given a class with tests in JUnit3 style`() {
val code =
"""
import junit.framework.TestCase

class FooTest : TestCase() {
fun testFoo_bar() {
}
}
""".trimIndent()
functionNamingRuleAssertThat(code).hasNoLintViolations()
}
}