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

Fix #459: Suppress "Redundant visibility modifier" Warnings in Generated Code #460

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

leinardi
Copy link

@leinardi leinardi commented Jan 2, 2025

Fix for #459

image

image

@evant
Copy link
Owner

evant commented Jan 2, 2025

Going to wait for #350 to be merged first so that a test can be written using -Wextra, ex:

    @ParameterizedTest
    @EnumSource(Target::class)
    fun does_not_warn_by_default(target: Target) {
        val projectCompiler = ProjectCompiler(target, workingDir)

        assertThat(
            projectCompiler.source(
                "MyComponent.kt",
                """
                import me.tatarka.inject.annotations.Component

                @Component abstract class MyComponent {
                }
                """.trimIndent()
            ).compile()
        ).warnings().isEmpty()
    }

@leinardi
Copy link
Author

@evant Hey, now that #350 has been merged, could you add the test so we can merge this PR as well? I’d do it myself, but I’m not too familiar with this particular test. I’d really appreciate it if you could take care of it.

@evant
Copy link
Owner

evant commented Jan 13, 2025

Yep was planning on adding it eventually if you didn't get to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants