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

Kover Not Excluding Function Parameters with Annotation Tag #571

Open
merlinpaypal opened this issue Mar 20, 2024 · 0 comments
Open

Kover Not Excluding Function Parameters with Annotation Tag #571

merlinpaypal opened this issue Mar 20, 2024 · 0 comments
Assignees
Labels
Bug Bug issue type S: confirmed Status: bug is reproduced or present

Comments

@merlinpaypal
Copy link

Describe the bug
I created a very basic annotation class that mostly works. It does exclude most of the function I want to exclude.

But it doesn't exclude the parameters of the function.

I even tried using it directly on the parameter and it still fails to exclude the parameter.

@Retention(AnnotationRetention.RUNTIME)
@Target(
	AnnotationTarget.CLASS,
	AnnotationTarget.CONSTRUCTOR,
	AnnotationTarget.FIELD,
	AnnotationTarget.FUNCTION,
	AnnotationTarget.LOCAL_VARIABLE,
	AnnotationTarget.PROPERTY,
	AnnotationTarget.TYPE,
	AnnotationTarget.TYPE_PARAMETER,
	AnnotationTarget.VALUE_PARAMETER,
)
annotation class KoverExcludeGenerated

And in my build.gradle, I have

koverReport {
	androidReports('debug') {
		filters {
			excludes {
				annotatedBy(
					'*KoverExcludeGenerated'
				)
			}
		}
	}
}

Expected behavior
I expect parameters to be excluded when a function is excluded.

Reproducer
A link to your project, if it is open source. Otherwise, please try to reproduce the problem on a small project.
If this is not feasible, give an example of the code on which the problem manifests itself.

Reports
Screenshot 2024-03-20 at 18 30 03

Environment

  • Kover Gradle Plugin version: 0.7.6
  • Gradle version: 8.5
  • Kotlin project type: Kotlin/Android Library
  • Coverage Toolset (if customized in build script): Kover
@merlinpaypal merlinpaypal added Bug Bug issue type S: untriaged Status: issue reported but unprocessed labels Mar 20, 2024
@shanshin shanshin added S: confirmed Status: bug is reproduced or present and removed S: untriaged Status: issue reported but unprocessed labels Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug issue type S: confirmed Status: bug is reproduced or present
Projects
None yet
Development

No branches or pull requests

2 participants