diff --git a/cmd/footer.go b/cmd/footer.go index ed44c30..474d097 100644 --- a/cmd/footer.go +++ b/cmd/footer.go @@ -52,18 +52,11 @@ func lintFooter(f []string) (errs []error) { } } - if s[0] == strings.ToUpper(s[0]) { - errs = append(errs, errInvalidFooterUpperCase) - } - if strings.Contains(s[0], " ") { errs = append(errs, errInvalidFooterSpace) } } - if s[1] == strings.ToUpper(s[1]) { - errs = append(errs, errInvalidFooterUpperCase) - } } } diff --git a/cmd/footer_test.go b/cmd/footer_test.go index bb12917..476b39c 100644 --- a/cmd/footer_test.go +++ b/cmd/footer_test.go @@ -80,26 +80,6 @@ func TestLintFooter(t *testing.T) { } }) - t.Run("invalid capitals", func(t *testing.T) { - trailers := [][]string{ - {"KEY: VALUE"}, - {"KEY: value"}, - {"key: VALUE"}, - } - want := errInvalidFooterUpperCase - - for _, trailer := range trailers { - got := lintFooter(trailer) - if got == nil { - t.Fatal("want error got nil") - } - - if !slices.Contains(got, want) { - t.Fatalf("Trailer: [ %v ], want error: [ %v ], got: %v", trailer, want, got) - } - } - }) - t.Run("invalid keys with spaces", func(t *testing.T) { trailer := []string{"key pair: value"} want := errInvalidFooterSpace