Skip to content

Commit 2ed5720

Browse files
committed
CLI docs: Address comments on Bazel example
1 parent 9913221 commit 2ed5720

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

docs/codeql/codeql-cli/creating-codeql-databases.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,8 @@ commands that you can specify for compiled languages.
225225

226226
# Navigate to the Bazel workspace.
227227

228-
# Stop all running Bazel server processes.
229-
bazel shutdown
230-
231-
# Remove cached objects before building.
228+
# Before building, remove cached objects
229+
# and stop all running Bazel server processes.
232230
bazel clean --expunge
233231

234232
# Build using the following Bazel flags, to help CodeQL detect the build:
@@ -238,6 +236,11 @@ commands that you can specify for compiled languages.
238236
codeql database create new-database --language=<language> \
239237
--command='bazel build --spawn_strategy=local --nouse_action_cache --noremote_accept_cached --noremote_upload_local_results //path/to/package:target'
240238

239+
# After building, stop all running Bazel server processes.
240+
# This ensures future build commands start in a clean Bazel server process
241+
# without CodeQL attached.
242+
bazel shutdown
243+
241244
- Project built using a custom build script::
242245

243246
codeql database create new-database --language=<language> --command='./scripts/build.sh'

0 commit comments

Comments
 (0)