Skip to content

Commit 94d5674

Browse files
committed
add checkstyle
Signed-off-by: Gregor Zeitlinger <[email protected]>
1 parent 20d428a commit 94d5674

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

checkstyle.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -371,15 +371,6 @@
371371
<module name="SuppressWarningsHolder"/>
372372
<!-- this enables CHECKSTYLE:OFF and CHECKSTYLE:ON comments -->
373373
<module name="SuppressionCommentFilter"/>
374-
<module name="Regexp">
375-
<!-- see comment in otel.errorprone-conventions.gradle.kts for why we disable the SystemOut
376-
rule there and rely on this check -->
377-
<property name="id" value="SystemOut"/>
378-
<!-- . matches any character, so we need to escape it and use \. to match dots. -->
379-
<property name="format"
380-
value="(System\.out\.print|System\.err\.print|\.printStackTrace\(\)|Thread\.dumpStack)"/>
381-
<property name="illegalPattern" value="true"/>
382-
</module>
383374
</module>
384375
<!-- this enables @SuppressWarnings("checkstyle:...") annotations -->
385376
<module name="SuppressWarningsFilter"/>

integration-tests/it-exporter/it-exporter-servlet-jetty-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/jetty/ExporterServletJettySample.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ public static void main(String[] args) throws Exception {
2929

3030
int port = parsePortOrExit(args[0]);
3131
Mode mode = parseModeOrExit(args[1]);
32+
run(mode, port);
33+
}
3234

35+
private static void run(Mode mode, int port) throws Exception {
3336
Counter counter =
3437
Counter.builder()
3538
.name("uptime_seconds_total")

integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/src/main/java/io/prometheus/metrics/it/exporter/servlet/tomcat/ExporterServletTomcatSample.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ public static void main(String[] args) throws LifecycleException, IOException {
3030
System.exit(1);
3131
}
3232

33-
//noinspection CheckStyle
3433
int port = parsePortOrExit(args[0]);
35-
//noinspection CheckStyle
3634
Mode mode = parseModeOrExit(args[1]);
35+
run(mode, port);
36+
}
3737

38+
private static void run(Mode mode, int port) throws IOException, LifecycleException {
3839
Counter counter =
3940
Counter.builder()
4041
.name("uptime_seconds_total")

0 commit comments

Comments
 (0)