FeatureFlags: Do not allow spaces in descriptions (#68852)

pull/68899/head
Ryan McKinley 2 years ago committed by GitHub
parent 900348f3d9
commit 07e794c312
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      pkg/services/featuremgmt/registry.go
  2. 2
      pkg/services/featuremgmt/toggles_gen.go
  3. 6
      pkg/services/featuremgmt/toggles_gen_test.go

@ -507,7 +507,7 @@ var (
},
{
Name: "faroDatasourceSelector",
Description: "Enable the data source selector within the Frontend Apps section of the Frontend Observability ",
Description: "Enable the data source selector within the Frontend Apps section of the Frontend Observability",
State: FeatureStateBeta,
FrontendOnly: true,
Owner: appO11ySquad,

@ -308,7 +308,7 @@ const (
FlagAdvancedDataSourcePicker = "advancedDataSourcePicker"
// FlagFaroDatasourceSelector
// Enable the data source selector within the Frontend Apps section of the Frontend Observability
// Enable the data source selector within the Frontend Apps section of the Frontend Observability
FlagFaroDatasourceSelector = "faroDatasourceSelector"
// FlagEnableDatagridEditing

@ -39,6 +39,12 @@ func TestFeatureToggleFiles(t *testing.T) {
if flag.State == FeatureStateUnknown {
t.Errorf("standard toggles should not have an unknown state. See: %s", flag.Name)
}
if flag.Description != strings.TrimSpace(flag.Description) {
t.Errorf("flag Description should not start/end with spaces. See: %s", flag.Name)
}
if flag.Name != strings.TrimSpace(flag.Name) {
t.Errorf("flag Name should not start/end with spaces. See: %s", flag.Name)
}
}
})

Loading…
Cancel
Save