Skip to content

Commit 467fbe6

Browse files
authored
Merge pull request #1534 from o1-labs/dw/docs-check-ocaml-ref-use-absolute-link
Website: use git grep to check OCaml ref + update absolute links
2 parents 77343a1 + f175b2e commit 467fbe6

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

.github/scripts/check-ocaml-refs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ echo "Current OCaml commit: ${CURRENT_COMMIT}"
6262

6363
# Find all Rust files with OCaml references
6464
cd "${RUST_ROOT}"
65-
RUST_FILES=$(rg -l "^/// OCaml reference:" --type rust || true)
65+
RUST_FILES=$(git grep -l -E "^/// OCaml reference:" "*.rs" "**/*.rs" || true)
6666

6767
if [ -z "$RUST_FILES" ]; then
6868
echo "No OCaml references found in Rust code"

.github/workflows/check-ocaml-refs.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ jobs:
4040
- name: Checkout repository
4141
uses: actions/checkout@v5
4242

43-
- name: Install ripgrep
44-
run: sudo apt-get update && sudo apt-get install -y ripgrep
45-
4643
- name: Run OCaml reference validation
4744
id: check
4845
env:
4946
OCAML_REPO: ${{ github.event.inputs.repo || 'https://github.com/MinaProtocol/mina.git' }}
5047
OCAML_BRANCH: ${{ github.event.inputs.branch || 'compatible' }}
48+
shell: bash
5149
run: |
5250
set +e
5351
# Capture output to file

website/docs/developers/ocaml-reference-tracking.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,6 @@ For single-line references, use the same number: `L:42-42`
131131

132132
## Example references
133133

134-
See `ledger/src/scan_state/transaction_logic/mod.rs` for examples of properly
135-
formatted OCaml references.
134+
See
135+
[`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)
136+
for examples of properly formatted OCaml references.

0 commit comments

Comments
 (0)