Skip to content

Commit a362800

Browse files
committed
improve docs
1 parent c0c863d commit a362800

File tree

1 file changed

+108
-1
lines changed

1 file changed

+108
-1
lines changed

README.md

Lines changed: 108 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,32 +133,139 @@ Repo Root
133133
**Initialize repo for query development**
134134

135135
```
136-
qlt query init
136+
Usage:
137+
qlt query init [options]
138+
139+
Options:
140+
--overwrite-existing Overwrite exiting files (if they exist). [default: False]
141+
--base <base> The base path to find the query repository. [default: C:\temp\p1]
142+
--automation-type <actions> (REQUIRED) The base path to find the query repository. [default: actions]
143+
-?, -h, --help Show help and usage information
144+
```
145+
146+
**Set the Version of CodeQL Used**
147+
148+
```
149+
Usage:
150+
qlt codeql set version [options]
151+
152+
Options:
153+
--cli-version <cli-version> (REQUIRED) The version of the cli to use. Example: `2.11.6`. [default:
154+
2.11.6]
155+
--standard-library-version <standard-library-version> The version of the standard library to use. Example:
156+
(REQUIRED) `codeql-cli/v2.11.6`. [default: codeql-cli/v2.11.6]
157+
--bundle-version <bundle-version> (REQUIRED) The bundle version to use. Example: `codeql-bundle-20221211`.
158+
[default: codeql-bundle-20221211]
159+
--base <base> The base path to find the query repository. [default:
160+
C:\temp\p1]
161+
--automation-type <actions> (REQUIRED) The base path to find the query repository. [default: actions]
162+
-?, -h, --help Show help and usage information
137163
```
138164

165+
139166
**Initialize CodeQL CI/CD and Unit Testing For Actions**
140167

141168
This command will install a number of workflows into your repository which include the necessary workflows for using QLT in your automation environment as well as the workflows for running CodeQL unit tests for the specified language.
142169

170+
```
171+
Usage:
172+
qlt test init [options]
173+
174+
Options:
175+
--overwrite-existing Overwrite exiting files (if they exist). [default: False]
176+
--num-threads <num-threads> Number of threads to use during test execution. [default:
177+
4]
178+
--use-runner <use-runner> The runner(s) to use. Should be a comma-seperated list of
179+
actions runners. [default: ubuntu-latest]
180+
--language <c|cpp|csharp|go|java|javascript|python|ruby> The language to generate automation for.
181+
(REQUIRED)
182+
--codeql-args <codeql-args> Extra arguments to pass to CodeQL.
183+
--base <base> The base path to find the query repository. [default:
184+
C:\temp\p1]
185+
--automation-type <actions> (REQUIRED) The base path to find the query repository. [default:
186+
actions]
187+
-?, -h, --help Show help and usage information
188+
```
189+
190+
191+
192+
Example usage:
143193
```
144194
qlt test init --use-runner ubuntu-latest --num-threads 4 --language c --automation-type actions
145195
```
146196

147197

148198
**Validate the metadata in your queries**
149199

200+
```
201+
Usage:
202+
qlt validation run check-queries [options]
203+
204+
Options:
205+
--language <c|cpp|csharp|go|java|javascript|python|ruby> The language to run tests for.
206+
(REQUIRED)
207+
--pretty-print (REQUIRED) Pretty prints error output in a pretty compact format.
208+
[default: False]
209+
--base <base> The base path to find the query repository. [default:
210+
C:\temp\p1]
211+
--automation-type <actions> (REQUIRED) The base path to find the query repository. [default:
212+
actions]
213+
-?, -h, --help Show help and usage information
214+
```
215+
216+
217+
Example Usage:
150218
```
151219
qlt validation run check-queries --pretty-print --language cpp
152220
```
153221

154222

155223
**Run your unit tests in parallel**
156224

225+
```
226+
Usage:
227+
qlt test run execute-unit-tests [options]
228+
229+
Options:
230+
--num-threads <num-threads> (REQUIRED) The number of threads to use for runner. For best
231+
performance, do not exceed the number of physical cores on
232+
your system. [default: 4]
233+
--work-dir <work-dir> (REQUIRED) Where to place intermediate execution output files.
234+
[default: C:\Users\jsingleton\AppData\Local\Temp\]
235+
--language <c|cpp|csharp|go|java|javascript|python|ruby> The language to run tests for.
236+
(REQUIRED)
237+
--runner-os <runner-os> (REQUIRED) Label for the operating system running these tests.
238+
--codeql-args <codeql-args> Extra arguments to pass to CodeQL.
239+
--base <base> The base path to find the query repository. [default:
240+
C:\temp\p1]
241+
--automation-type <actions> (REQUIRED) The base path to find the query repository. [default:
242+
actions]
243+
-?, -h, --help Show help and usage information
244+
```
245+
246+
247+
Example Usage:
157248
```
158249
qlt test run execute-unit-tests --num-threads 4 --language cpp --runner-os "Linux" --work-dir /tmp/my-project
159250
```
160251

161252
**Validate unit test run data**
253+
254+
```
255+
Usage:
256+
qlt test run validate-unit-tests [options]
257+
258+
Options:
259+
--results-directory <results-directory> (REQUIRED) Where to find the intermediate execution output files.
260+
--pretty-print (REQUIRED) Pretty print test output in a compact format. Note this will not
261+
exit with a failure code if tests fail. [default: False]
262+
--base <base> The base path to find the query repository. [default: C:\temp\p1]
263+
--automation-type <actions> (REQUIRED) The base path to find the query repository. [default: actions]
264+
-?, -h, --help Show help and usage information
265+
```
266+
267+
268+
Example Usage:
162269
```
163270
qlt test run validate-unit-tests --pretty-print --results-directory /tmp/my-project
164271
```

0 commit comments

Comments
 (0)