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

Private classes in public files trigger missing tests check #72

Open
MiSikora opened this issue Jul 5, 2024 · 0 comments
Open

Private classes in public files trigger missing tests check #72

MiSikora opened this issue Jul 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@MiSikora
Copy link

MiSikora commented Jul 5, 2024

When a class is private but it is in a public file it triggers the check like here. We don't use the latest 1.2.0 version in Pocket Casts but I don't see any changes in the git history that might got it fixed.

Here's a sample of offending code. I'm guessing a bit because I didn't check dangermattic project out to test it but it replicates more or less the code from the failing PR.

Assume Hello.kt file.

class Hello {
    private val worlds = listOf(Earth(), Mars())

    fun print() = worlds.joinToString(prefix = "Hello, ", separator = ", ", postfix = "!", transform = World::print)
}

private interface World {
    fun print(): String
}

private class Earth : World {
    override fun print() = "Earth"
}

private class Mars : World {
    override fun print() = "Mars"
}
@MiSikora MiSikora added the bug Something isn't working label Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant