Skip to content

Commit 080867a

Browse files
committed
Add reviewer feedback
1 parent c62a21e commit 080867a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ The ``codeql database init`` command will output a message::
265265
The ``codeql database init`` command creates ``<database>/temp/tracingEnvironment`` with files that contain environment variables and values that will enable CodeQL to trace a sequence of build steps. These files are named ``start-tracing.{json,sh,bat,ps1}``. Use one of these files with your CI system's mechanism for setting environment variables for future steps. You can:
266266

267267
* Read the JSON file, process it, and print out environment variables in the format expected by your CI system. For example, Azure DevOps expects ``echo "##vso[task.setvariable variable=NAME]VALUE"``.
268-
* Or source the appropriate ``start-tracing`` script to set the CodeQL variables in the shell environment of the CI system.
268+
* Or, if your CI system persists the environment, source the appropriate ``start-tracing`` script to set the CodeQL variables in the shell environment of the CI system.
269269

270-
Build your code and then run the command ``codeql database finalize <database>``. Optionally, after building the code, unset the environment variables using an ``end-tracing.{json,sh,bat,ps1}`` script from the directory where the ``start-tracing`` scripts are stored.
270+
Build your code; optionally, unset the environment variables using an ``end-tracing.{json,sh,bat,ps1}`` script from the directory where the ``start-tracing`` scripts are stored; and then run the command ``codeql database finalize <database>``.
271271

272272
Once you have created a CodeQL database using indirect build tracing, you can work with it like any other CodeQL database. For example, analyze the database, and upload the results to GitHub if you use code scanning.
273273

@@ -292,7 +292,7 @@ The following example shows how you could use indirect build tracing in an Azure
292292
# Assumes the source code is checked out to the current working directory.
293293
# Creates a database at `<current working directory>/db`.
294294
# Running on Windows, so specifies a trace process level.
295-
script: "codeql database init --language csharp --trace-process-level 3 --source-root --begin-tracing db"
295+
script: "codeql database init --language csharp --trace-process-name Agent.Worker.exe --source-root . --begin-tracing db"
296296

297297
# Read the generated environment variables and values,
298298
# and set them so they are available for subsequent commands
@@ -325,7 +325,7 @@ The following example shows how you could use indirect build tracing in an Azure
325325

326326
# Read and set the generated environment variables to end build tracing. This is done in PowerShell in this example.
327327
- task: PowerShell@1
328-
displayName: Set CodeQL environment variables
328+
displayName: Clear CodeQL environment variables
329329
inputs:
330330
targetType: inline
331331
script: >

0 commit comments

Comments
 (0)