From 1262a2b2a87be090435df40dd9b9ab3aaf08b527 Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Fri, 31 Oct 2025 15:07:19 +0000 Subject: [PATCH] Drive-by contributing doc update for policies makefile --- docs/development/contributing.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/development/contributing.md b/docs/development/contributing.md index 1bb04e730..4f2472314 100644 --- a/docs/development/contributing.md +++ b/docs/development/contributing.md @@ -72,6 +72,7 @@ Make sure your code adheres to our Rust and TypeScript code style by running: - `cargo +nightly fmt` (with the nightly toolchain installed) - `npm run format` in the `frontend` directory + - `make fmt` in the `policies` directory (if changed) When updating SQL queries in the `crates/storage-pg/` crate, you may need to update the `sqlx` introspection data. To do this, make sure to install `cargo-sqlx` (`cargo install sqlx-cli`) and: @@ -86,6 +87,7 @@ While you're developing and before submitting a patch, you'll want to test your - Run `cargo clippy --workspace` to lint the Rust code. - Run `npm run lint` in the `frontend` directory to lint the frontend code. +- Run `make fmt` and `make lint` in the `policies` directory to format and lint the included policy. ### Run the tests @@ -93,6 +95,10 @@ If you haven't already, install [Cargo-Nextest](https://nexte.st/docs/installati - Run the tests to the backend by running `cargo nextest run --workspace`. This requires a connection to a PostgreSQL database, set via the `DATABASE_URL` environment variable. - Run the tests to the frontend by running `npm run test` in the `frontend` directory. +- To run the tests for the included policy, change to the `policies` directory and run one of: + - `make test` (needs OpenPolicyAgent installed) + - `make PODMAN=1 test` (runs inside a container; needs Podman installed) + - `make DOCKER=1 test` (runs inside a container; needs Docker installed) ## 8. Submit a pull request