diff --git a/.github/scripts/check-ocaml-refs.sh b/.github/scripts/check-ocaml-refs.sh index e6167c248..adc11d052 100755 --- a/.github/scripts/check-ocaml-refs.sh +++ b/.github/scripts/check-ocaml-refs.sh @@ -62,7 +62,7 @@ echo "Current OCaml commit: ${CURRENT_COMMIT}" # Find all Rust files with OCaml references cd "${RUST_ROOT}" -RUST_FILES=$(rg -l "^/// OCaml reference:" --type rust || true) +RUST_FILES=$(git grep -l -E "^/// OCaml reference:" "*.rs" "**/*.rs" || true) if [ -z "$RUST_FILES" ]; then echo "No OCaml references found in Rust code" diff --git a/.github/workflows/check-ocaml-refs.yaml b/.github/workflows/check-ocaml-refs.yaml index 7ce9b1d7e..00c9902b6 100644 --- a/.github/workflows/check-ocaml-refs.yaml +++ b/.github/workflows/check-ocaml-refs.yaml @@ -40,14 +40,12 @@ jobs: - name: Checkout repository uses: actions/checkout@v5 - - name: Install ripgrep - run: sudo apt-get update && sudo apt-get install -y ripgrep - - name: Run OCaml reference validation id: check env: OCAML_REPO: ${{ github.event.inputs.repo || 'https://github.com/MinaProtocol/mina.git' }} OCAML_BRANCH: ${{ github.event.inputs.branch || 'compatible' }} + shell: bash run: | set +e # Capture output to file diff --git a/website/docs/developers/ocaml-reference-tracking.md b/website/docs/developers/ocaml-reference-tracking.md index 8fd9612d6..6112752ec 100644 --- a/website/docs/developers/ocaml-reference-tracking.md +++ b/website/docs/developers/ocaml-reference-tracking.md @@ -131,5 +131,6 @@ For single-line references, use the same number: `L:42-42` ## Example references -See `ledger/src/scan_state/transaction_logic/mod.rs` for examples of properly -formatted OCaml references. +See +[`ledger/src/scan_state/transaction_logic/mod.rs`](https://github.com/o1-labs/mina-rust/blob/develop/ledger/src/scan_state/transaction_logic/mod.rs) +for examples of properly formatted OCaml references.