From 4d3b8e5269befe94835fe556399846ad7646ff5d Mon Sep 17 00:00:00 2001 From: Federico Builes Date: Wed, 21 Sep 2022 17:01:00 +0200 Subject: [PATCH] Clarify code a bit. --- src/config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index cfc9d47..e897908 100644 --- a/src/config.ts +++ b/src/config.ts @@ -27,7 +27,11 @@ export function readConfig(): ConfigurationOptions { const externalConfig = getOptionalInput('config-file') if (externalConfig !== undefined) { const config = readConfigFile(externalConfig) + // the reasoning behind reading the inline config when an external + // config file is provided is that we still want to allow users to + // pass inline options in the presence of an external config file. const inlineConfig = readInlineConfig() + // the external config takes precedence return Object.assign({}, inlineConfig, config) } else { return readInlineConfig() @@ -38,7 +42,6 @@ export function readInlineConfig(): ConfigurationOptions { const fail_on_severity = SeveritySchema.parse( getOptionalInput('fail-on-severity') ) - const fail_on_scopes = z .array(z.enum(SCOPES)) .default(['runtime'])