Skip to content

Commit 1f62aee

Browse files
sararobcopybara-github
authored andcommitted
chore: improve jacoco coverage report
PiperOrigin-RevId: 743913479
1 parent bc19d79 commit 1f62aee

File tree

5 files changed

+142
-1
lines changed

5 files changed

+142
-1
lines changed

pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,9 @@
302302
<formats>
303303
<format>HTML</format>
304304
</formats>
305+
<excludes>
306+
<exclude>com/google/genai/types/AutoValue_*.class</exclude>
307+
</excludes>
305308
</configuration>
306309
</execution>
307310
</executions>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.genai;
18+
19+
import java.lang.annotation.ElementType;
20+
import java.lang.annotation.Retention;
21+
import java.lang.annotation.RetentionPolicy;
22+
import java.lang.annotation.Target;
23+
24+
/**
25+
* Annotation to exclude a method or constructor from the Jacoco coverage report.
26+
*
27+
* <p>Jacoco will exclude methods that have an annotation with the word "generated" in it.
28+
*/
29+
@Retention(RetentionPolicy.CLASS)
30+
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE})
31+
@interface ExcludeFromGeneratedCoverageReport {}

0 commit comments

Comments
 (0)