From 2ed572095c10790e16b442d6aa706db06b2b8d36 Mon Sep 17 00:00:00 2001 From: Aditya Sharad Date: Thu, 7 Oct 2021 10:51:11 -0700 Subject: [PATCH] CLI docs: Address comments on Bazel example --- docs/codeql/codeql-cli/creating-codeql-databases.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/codeql/codeql-cli/creating-codeql-databases.rst b/docs/codeql/codeql-cli/creating-codeql-databases.rst index fd9bf9a0847..52bd076e636 100644 --- a/docs/codeql/codeql-cli/creating-codeql-databases.rst +++ b/docs/codeql/codeql-cli/creating-codeql-databases.rst @@ -225,10 +225,8 @@ commands that you can specify for compiled languages. # Navigate to the Bazel workspace. - # Stop all running Bazel server processes. - bazel shutdown - - # Remove cached objects before building. + # Before building, remove cached objects + # and stop all running Bazel server processes. bazel clean --expunge # Build using the following Bazel flags, to help CodeQL detect the build: @@ -238,6 +236,11 @@ commands that you can specify for compiled languages. codeql database create new-database --language= \ --command='bazel build --spawn_strategy=local --nouse_action_cache --noremote_accept_cached --noremote_upload_local_results //path/to/package:target' + # After building, stop all running Bazel server processes. + # This ensures future build commands start in a clean Bazel server process + # without CodeQL attached. + bazel shutdown + - Project built using a custom build script:: codeql database create new-database --language= --command='./scripts/build.sh'