diff --git a/pkg/text/check_message_title.go b/pkg/text/check_message_title.go index 529158f5..9d5b0238 100644 --- a/pkg/text/check_message_title.go +++ b/pkg/text/check_message_title.go @@ -18,7 +18,7 @@ var ( // Fields such as category and chore should contain only word characters categoryRegex = regexp.MustCompile(`^\w+$`) - scopeRegex = regexp.MustCompile(`^\w+(-\w+|_\w+| \w+)*$`) + scopeRegex = regexp.MustCompile(`^\w+(-\w+|_\w+|/\w+| \w+)*$`) // Commits with breaking changes should contain text with BREAKING CHANGE: at start bcRegex = regexp.MustCompile(`^BREAKING CHANGE: `) diff --git a/pkg/text/check_message_title_test.go b/pkg/text/check_message_title_test.go index bd5fb095..56f84cab 100644 --- a/pkg/text/check_message_title_test.go +++ b/pkg/text/check_message_title_test.go @@ -21,6 +21,7 @@ func TestCheckMessageTitleNonStrict(t *testing.T) { quoad.Commit{Category: "test", Heading: "a heading", Body: "body is here", Breaking: true}, quoad.Commit{Category: "test", Scope: "dashed-scope", Heading: "a heading", Body: "body is here", Breaking: true}, quoad.Commit{Category: "test", Scope: "undescore_scope", Heading: "a heading", Body: "body is here", Breaking: true}, + quoad.Commit{Category: "test", Scope: "slash/scope", Heading: "a heading", Body: "body is here", Breaking: true}, }, errCategoryWrongFormat: []quoad.Commit{ quoad.Commit{Category: "fix!", Breaking: true, Heading: "breaking"},