Skip to content

Commit 817d568

Browse files
committed
Improve docs in setup-codeql
1 parent 34d43db commit 817d568

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/setup-codeql.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,20 @@ async function findOverridingToolsInCache(
261261
return undefined;
262262
}
263263

264+
/**
265+
* Determines where the CodeQL CLI we want to use comes from. This can be from a local file,
266+
* the Actions toolcache, or a download.
267+
*
268+
* @param toolsInput The argument provided for the `tools` input, if any.
269+
* @param defaultCliVersion The default CLI version that's linked to the CodeQL Action.
270+
* @param apiDetails Information about the GitHub API.
271+
* @param variant The GitHub variant we are running on.
272+
* @param tarSupportsZstd Whether zstd is supported by `tar`.
273+
* @param features Information about enabled features.
274+
* @param logger The logger to use.
275+
*
276+
* @returns
277+
*/
264278
export async function getCodeQLSource(
265279
toolsInput: string | undefined,
266280
defaultCliVersion: CodeQLDefaultVersionInfo,
@@ -270,6 +284,9 @@ export async function getCodeQLSource(
270284
features: FeatureEnablement,
271285
logger: Logger,
272286
): Promise<CodeQLToolsSource> {
287+
// If there is an explicit `tools` input, it's not one of the reserved values, and it doesn't appear
288+
// to point to a URL, then we assume it is a local path and use the CLI from there.
289+
// TODO: This appears to misclassify filenames that happen to start with `http` as URLs.
273290
if (
274291
toolsInput &&
275292
!isReservedToolsValue(toolsInput) &&

0 commit comments

Comments
 (0)