From 24b0c32c0a0aeabc2131361f9bacaeaec8988ada Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Mon, 23 Jan 2023 09:25:18 -0800 Subject: config: Don't require packages to be alphabetical (#66) The configuration parser requries that entries in the 'packages' section are in alphabetical order. It will fail parsing if that's not the case, even if the configuration is otherwise valid. This seems like an unnecessary artificial limitation. Enforcing such a convention should be the user's choice. This change deletes this limitation. --- config_test.go | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'config_test.go') diff --git a/config_test.go b/config_test.go index eb6c463..e4146b1 100644 --- a/config_test.go +++ b/config_test.go @@ -106,22 +106,3 @@ packages: }) } } - -func TestNotAlphabetical(t *testing.T) { - path, clean := TempFile(t, ` - -url: google.golang.org -packages: - grpc: - repo: github.com/grpc/grpc-go - atomic: - repo: github.com/uber-go/atomic - -`) - defer clean() - - _, err := Parse(path) - if assert.Error(t, err, "YAML configuration is not listed alphabetically") { - assert.Contains(t, err.Error(), "must be alphabetically ordered") - } -} -- cgit v1.2.3