Revise the Validation()
method of the Option
interface
#322
Labels
kind/enhancement
Enhancement, improvement, extension
priority/4
Priority (lower number equals higher priority)
What would you like to be added:
Currently there are places for improving the
Validation()
method of theOption
interface in thepkg/shared/ruleset/disak8sstig/option
packagediki/pkg/shared/ruleset/disak8sstig/option/options.go
Lines 15 to 19 in db51f28
Most implementations of
Option
addfield.Path
to the errors returned fromValidate()
. ex:diki/pkg/shared/ruleset/disak8sstig/option/options.go
Lines 116 to 120 in db51f28
We should allow
field.Path
to be passed to theValidate()
method to have a better description of which options are not valid.Currently
Validate()
returnsfield.ErrorList
. We should look into weather it is better to return anerror
which contains all othererror
s merged witherrors.Join()
Why is this needed:
Enhance user options validation experience.
The text was updated successfully, but these errors were encountered: