Skip to content

Latest commit

 

History

History
67 lines (44 loc) · 1.8 KB

File metadata and controls

67 lines (44 loc) · 1.8 KB

Contributing

Prometheus uses GitHub to manage reviews of pull requests.

  • If you have a trivial fix or improvement, go ahead and create a pull request, addressing (with @...) the maintainer of this repository (see MAINTAINERS.md) in the description of the pull request.

  • If you plan to do something more involved, first discuss your ideas on our mailing list. This will avoid unnecessary work and surely give you and us a good deal of inspiration.

Formatting

This repository uses Google Java Format to format the code.

Run ./mvnw spotless:apply to format the code (only changed files) before committing.

Or run all the linters:

mise run lint:super-linter

Running Tests

If you're getting errors when running tests:

  • Make sure that the IDE uses only the "Maven Shade" dependency of " prometheus-metrics-exposition-formats" and the "prometheus-metrics-tracer*" dependencies.

Running native tests

mise --cd .mise/envs/native run native-test

Avoid failures while running tests

  • Use -Dspotless.check.skip=true to skip the formatting check during development.
  • 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

./mvnw install -DskipTests -Dspotless.check.skip=true -Dcoverage.skip=true \
  -Dcheckstyle.skip=true -Dwarnings=-nowarn

or simply

mise run compile

Updating the Protobuf Java Classes

In the failing PR from renovate, run:

mise run generate

Add the new Metrics.java to Git and commit it.