Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/renovate-tracked-deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,13 @@
"mise.toml": {
"mise": [
"actionlint",
"aqua:grafana/flint",
"aqua:checkstyle/checkstyle",
"aqua:grafana/gcx",
"aqua:grafana/oats",
"aqua:jonwiggins/xmloxide",
"aqua:owenlamont/ryl",
"biome",
"cargo:https://github.com/grafana/flint",
"editorconfig-checker",
"google-java-format",
"hugo",
Expand Down
8 changes: 4 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ mise run ci
# Quick compile without tests or checks (fastest)
mise run compile

# Run unit tests only (skips formatting/coverage/checkstyle)
# Run unit tests only (skips formatting and coverage)
mise run test

# Run all tests including integration tests
mise run test-all

# Run a single test class
./mvnw test -Dtest=CounterTest \
-Dcoverage.skip=true -Dcheckstyle.skip=true
-Dcoverage.skip=true

# Run a single test method
./mvnw test -Dtest=CounterTest#testIncrement \
-Dcoverage.skip=true -Dcheckstyle.skip=true
-Dcoverage.skip=true

# Run tests in a specific module
./mvnw test -pl prometheus-metrics-core \
-Dcoverage.skip=true -Dcheckstyle.skip=true
-Dcoverage.skip=true

# Regenerate protobuf classes (after protobuf dep update)
mise run generate
Expand Down
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,12 @@ mise --cd .mise/envs/native run native-test
### Avoid failures while running tests

- Use `-Dcoverage.skip=true` to skip the coverage check during development.
- Use `-Dcheckstyle.skip=true` to skip the checkstyle check during development.
- Use `-Dwarnings=-nowarn` to skip the warnings during development.

Combine all with

```shell
./mvnw install -DskipTests -Dcoverage.skip=true \
-Dcheckstyle.skip=true -Dwarnings=-nowarn
./mvnw install -DskipTests -Dcoverage.skip=true -Dwarnings=-nowarn
```

or simply
Expand Down
8 changes: 8 additions & 0 deletions checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,12 @@

<!-- Suppress all Javadoc checks for integration tests -->
<suppress checks="Javadoc" files=".*[/\\]integration-tests[/\\].*"/>

<!-- Preserve the repository's main-source-only Checkstyle policy when Flint invokes the
standalone CLI with explicit Java files. -->
<suppress checks=".*" files=".*[/\\]src[/\\]test[/\\]java[/\\].*"/>
<suppress checks=".*" files=".*[/\\]src[/\\]archive[/\\]java[/\\].*"/>

<!-- Example setup intentionally groups declarations before the simulated work that uses them. -->
<suppress checks="VariableDeclarationUsageDistance" files=".*[/\\]examples[/\\].*"/>
</suppressions>
43 changes: 43 additions & 0 deletions mise.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ protoc = "35.1"

# Linters
actionlint = "1.7.12"
"aqua:grafana/flint" = "0.22.7"
"aqua:checkstyle/checkstyle" = "checkstyle-13.8.0"
"aqua:jonwiggins/xmloxide" = "v0.4.3"
"aqua:owenlamont/ryl" = "0.21.0"
biome = "2.5.3"
"cargo:https://github.com/grafana/flint" = "rev:67309cf"
editorconfig-checker = "3.8.0"
google-java-format = "1.35.0"
lychee = "0.24.2"
Expand Down Expand Up @@ -46,16 +47,16 @@ run = "./mvnw clean"

[tasks.compile]
description = "bare compile, ignoring formatting and linters"
run = "./mvnw install -DskipTests -Dcoverage.skip=true -Dcheckstyle.skip=true -Dwarnings=-nowarn"
run = "./mvnw install -DskipTests -Dcoverage.skip=true -Dwarnings=-nowarn"

[tasks.generate]
description = "regenerate protobuf sources"
run = "./mvnw clean install -DskipTests -Dcoverage.skip=true -Dcheckstyle.skip=true -Dwarnings=-nowarn"
run = "./mvnw clean install -DskipTests -Dcoverage.skip=true -Dwarnings=-nowarn"
env.PROTO_GENERATION = "true"

[tasks.test]
description = "run unit tests, ignoring formatting and linters"
run = "./mvnw test -Dcoverage.skip=true -Dcheckstyle.skip=true -Dwarnings=-nowarn"
run = "./mvnw test -Dcoverage.skip=true -Dwarnings=-nowarn"

[tasks.test-all]
description = "run all tests"
Expand All @@ -76,7 +77,6 @@ BASELINE_OVERRIDE="${API_DIFF_BASELINE_VERSION:+-Dapi.diff.baseline.version=${AP
${BASELINE_OVERRIDE} \
-DskipTests \
-Dcoverage.skip=true \
-Dcheckstyle.skip=true \
-Dwarnings=-nowarn
./.github/scripts/sync-api-diffs.sh
"""
Expand Down
23 changes: 0 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
<!-- Bumped by .github/workflows/bump-api-diff-baseline.yml after each release. -->
<api.diff.baseline.version>1.8.0</api.diff.baseline.version>
<jacoco.line-coverage>0.70</jacoco.line-coverage>
<checkstyle.skip>false</checkstyle.skip>
<coverage.skip>false</coverage.skip>
<javadoc.skip>false</javadoc.skip>
<warnings>-Werror</warnings>
Expand Down Expand Up @@ -182,28 +181,6 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<consoleOutput>true</consoleOutput>
<configLocation>google_checks.xml</configLocation>
<configLocation>checkstyle.xml</configLocation>
<violationSeverity>warning</violationSeverity>
<failOnViolation>true</failOnViolation>
<skip>${checkstyle.skip}</skip>
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
<excludes>**/generated/**,**/jmh_generated/*</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Expand Down
1 change: 0 additions & 1 deletion prometheus-metrics-otel-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
</description>

<properties>
<checkstyle.skip>true</checkstyle.skip>
<coverage.skip>true</coverage.skip>
<javadoc.skip>true</javadoc.skip>
</properties>
Expand Down
1 change: 0 additions & 1 deletion prometheus-metrics-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
</description>

<properties>
<checkstyle.skip>true</checkstyle.skip>
<coverage.skip>true</coverage.skip>
<javadoc.skip>true</javadoc.skip>
</properties>
Expand Down
Loading