mirror of
https://github.com/github/codeql-action
synced 2026-10-07 00:30:17 +03:00
Describe what parseUserConfig accepts, returns and throws more precisely
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot App
parent
8e6b600bd0
commit
55e4091e2b
@@ -639,10 +639,12 @@ export function generateCodeScanningConfig(
|
||||
*
|
||||
* @param logger The logger to use.
|
||||
* @param pathInput Where `contents` came from, such as the path to a file, for use in error messages.
|
||||
* @param contents The string contents of a YAML file to try and parse as a `UserConfig`.
|
||||
* @param validateConfig Whether to validate the configuration file against the schema.
|
||||
* @returns The `UserConfig` corresponding to `contents`, if parsing was successful.
|
||||
* @throws A `ConfigurationError` if parsing failed.
|
||||
* @param contents The YAML to try and parse as a `UserConfig`.
|
||||
* @param validateConfig Whether to validate the configuration against the schema.
|
||||
* @returns The `UserConfig` corresponding to `contents`, if parsing was successful. Unless
|
||||
* `validateConfig` is set, the result might not be a mapping.
|
||||
* @throws A `ConfigurationError` if `contents` isn't valid YAML or, when `validateConfig` is set,
|
||||
* isn't a valid configuration.
|
||||
*/
|
||||
export function parseUserConfig(
|
||||
logger: Logger,
|
||||
|
||||
Reference in New Issue
Block a user