From c980c092c75100c8d2040581c24dceaf905254bd Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Wed, 8 Jan 2025 12:40:26 -0500 Subject: [PATCH] docs: add `--locked` to cargo commands --- DEVELOPMENT.md | 10 +++++----- README.md | 2 +- doc/owasp-benchmark.md | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index f7aefc8c..9df95945 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -5,7 +5,7 @@ You need to have all the necessary [tree-sitter](https://github.com/tree-sitter) in `kernel` for the analysis to work. The `build` process will take care of this for you: ```shell -cargo build --profile release-dev +cargo build --locked --profile release-dev ``` > [!TIP] > The use of the `release-dev` cargo profile is highly recommended, as runtime analysis speed is effectively @@ -15,13 +15,13 @@ cargo build --profile release-dev ```shell -cargo run --profile release-dev --bin datadog-static-analyzer -- --directory --output result.json --format sarif --debug yes +cargo run --locked --profile release-dev --bin datadog-static-analyzer -- --directory --output result.json --format sarif --debug yes ``` ## Start a local server ```shell -cargo run --profile release-dev --bin datadog-static-analyzer-server -- --port -a +cargo run --locked --profile release-dev --bin datadog-static-analyzer-server -- --port -a ``` ## Run tests @@ -36,7 +36,7 @@ cargo test ## Test a ruleset ```shell -cargo run --bin datadog-static-analyzer-test-ruleset -- -r 1 +cargo run --locked --bin datadog-static-analyzer-test-ruleset -- -r 1 ``` @@ -52,7 +52,7 @@ cargo test -- --nocapture First, start the server using ```shell -cargo run --profile release-dev --bin datadog-static-analyzer-server +cargo run --locked --profile release-dev --bin datadog-static-analyzer-server ``` diff --git a/README.md b/README.md index 192c30c4..ceb42a3e 100644 --- a/README.md +++ b/README.md @@ -311,7 +311,7 @@ diff aware not enabled (error when receiving diff-aware data from Datadog with c Export rulesets from the API into a file ```shell -cargo run --bin datadog-export-rulesets -- -r -o +cargo run --locked --bin datadog-export-rulesets -- -r -o ``` ## More diff --git a/doc/owasp-benchmark.md b/doc/owasp-benchmark.md index 5d99b847..e7624153 100644 --- a/doc/owasp-benchmark.md +++ b/doc/owasp-benchmark.md @@ -59,7 +59,7 @@ git clone https://github.com/DataDog/datadog-static-analyzer.git Then, run it. At the top directory of the static analyzer, use ``` -cargo run --release --bin datadog-static-analyzer -- --format sarif --output /path/to/BenchmarkJava/results/Benchmark_1.2-DatadogSast.sarif --directory /path/to/BenchmarkJava +cargo run --locked --release --bin datadog-static-analyzer -- --format sarif --output /path/to/BenchmarkJava/results/Benchmark_1.2-DatadogSast.sarif --directory /path/to/BenchmarkJava ```