diff options
| author | Paul Buetow <paul@buetow.org> | 2023-04-25 00:16:39 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2023-04-25 00:16:39 +0300 |
| commit | b4b85046fef253d28f8e90ad76dca2e7552fe0ab (patch) | |
| tree | 44e7f41cdcbabdbce2f134753be9828799f58066 /internal/config.go | |
| parent | 3abf436db869c99586ff55af9bd562a33d114607 (diff) | |
add DependsOn
Diffstat (limited to 'internal/config.go')
| -rw-r--r-- | internal/config.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/config.go b/internal/config.go index 85782cf..cb55ec8 100644 --- a/internal/config.go +++ b/internal/config.go @@ -53,3 +53,14 @@ func newConfig(configFile string) (config, error) { return config, nil } + +func (c config) sanityCheck() error { + for name, check := range c.Checks { + for _, depName := range check.DependsOn { + if _, ok := c.Checks[depName]; !ok { + return fmt.Errorf("check '%s' depends on non existant check '%s'", depName, name) + } + } + } + return nil +} |
