From 4f3c07469fa86e630e3cf27745c660eb29b31ac3 Mon Sep 17 00:00:00 2001 From: James Pogran Date: Tue, 8 Aug 2023 12:11:46 -0400 Subject: [PATCH] Introduce a new setting for early validation (#1353) Adds `validation.earlyValidation` as a new setting. I chose to use `validation` as a primary key as we expect to add future settings for this feature. --- internal/settings/settings.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/settings/settings.go b/internal/settings/settings.go index c93a68bb8..f8638917f 100644 --- a/internal/settings/settings.go +++ b/internal/settings/settings.go @@ -18,6 +18,10 @@ type ExperimentalFeatures struct { PrefillRequiredFields bool `mapstructure:"prefillRequiredFields"` } +type ValidationOptions struct { + EarlyValidation bool `mapstructure:"earlyValidation"` +} + type Indexing struct { IgnoreDirectoryNames []string `mapstructure:"ignoreDirectoryNames"` IgnorePaths []string `mapstructure:"ignorePaths"` @@ -36,6 +40,8 @@ type Options struct { // ExperimentalFeatures encapsulates experimental features users can opt into. ExperimentalFeatures ExperimentalFeatures `mapstructure:"experimentalFeatures"` + Validation ValidationOptions `mapstructure:"validation"` + IgnoreSingleFileWarning bool `mapstructure:"ignoreSingleFileWarning"` Terraform Terraform `mapstructure:"terraform"`