Skip to content

Commit 55e4091

Browse files
henrymercerCopilot
andcommitted
Describe what parseUserConfig accepts, returns and throws more precisely
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 8e6b600 commit 55e4091

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎src/config/db-config.ts‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -639,10 +639,12 @@ export function generateCodeScanningConfig(
639639
*
640640
* @param logger The logger to use.
641641
* @param pathInput Where `contents` came from, such as the path to a file, for use in error messages.
642-
* @param contents The string contents of a YAML file to try and parse as a `UserConfig`.
643-
* @param validateConfig Whether to validate the configuration file against the schema.
644-
* @returns The `UserConfig` corresponding to `contents`, if parsing was successful.
645-
* @throws A `ConfigurationError` if parsing failed.
642+
* @param contents The YAML to try and parse as a `UserConfig`.
643+
* @param validateConfig Whether to validate the configuration against the schema.
644+
* @returns The `UserConfig` corresponding to `contents`, if parsing was successful. Unless
645+
* `validateConfig` is set, the result might not be a mapping.
646+
* @throws A `ConfigurationError` if `contents` isn't valid YAML or, when `validateConfig` is set,
647+
* isn't a valid configuration.
646648
*/
647649
export function parseUserConfig(
648650
logger: Logger,

0 commit comments

Comments
 (0)