Question: Valid scope clarification #155

Open
opened 2026-02-17 11:50:15 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @DeveloperC286 on GitHub (Sep 26, 2022).

Hey,

I am the maintainer of a Conventional Commits linter that is still in development[1] and I have a question around valid scopes.

I read the full specification[2] and for scopes it says.

4. A scope MAY be provided after a type. A scope MUST consist of a noun describing a section of the codebase surrounded by parenthesis, e.g., fix(parser):

To me as it says noun only alphanumeric characters and hyphens(for hyphenated nouns) are allowed, no other whitespace/characters are allowed.

Examples such as

  • fix(a b): 123
  • fix(a_b): 123

etc would not be valid Conventional Commits?

Can I please get some clarity around this, thank you!

Originally created by @DeveloperC286 on GitHub (Sep 26, 2022). Hey, I am the maintainer of a Conventional Commits linter that is still in development[1] and I have a question around valid scopes. I read the full specification[2] and for scopes it says. ``` 4. A scope MAY be provided after a type. A scope MUST consist of a noun describing a section of the codebase surrounded by parenthesis, e.g., fix(parser): ``` To me as it says `noun` only alphanumeric characters and hyphens(for hyphenated nouns) are allowed, no other whitespace/characters are allowed. Examples such as * `fix(a b): 123` * `fix(a_b): 123` etc would not be valid Conventional Commits? Can I please get some clarity around this, thank you! * [1] https://gitlab.com/DeveloperC/conventional_commits_linter * [2] https://www.conventionalcommits.org/en/v1.0.0/#specification
GiteaMirror added the discussion label 2026-02-17 11:50:15 -06:00
Author
Owner

@DeveloperC286 commented on GitHub (Oct 21, 2022):

Bump.

@DeveloperC286 commented on GitHub (Oct 21, 2022): Bump.
Author
Owner

@DeveloperC286 commented on GitHub (Jan 17, 2023):

Bump.

@DeveloperC286 commented on GitHub (Jan 17, 2023): Bump.
Author
Owner

@damianopetrungaro commented on GitHub (Jan 17, 2023):

Hey, sorry for the delay!

Both are technically invalid yes, those MUST be a noun, in general I suggest you to keep this a bit flexible as each team could allow underscores or verbs for example, it depends how strict you want to be with your tool :)

@damianopetrungaro commented on GitHub (Jan 17, 2023): Hey, sorry for the delay! Both are technically invalid yes, those MUST be a noun, in general I suggest you to keep this a bit flexible as each team could allow underscores or verbs for example, it depends how strict you want to be with your tool :)
Author
Owner

@ozyx commented on GitHub (Apr 24, 2025):

Hey, sorry for the delay!

Both are technically invalid yes, those MUST be a noun, in general I suggest you to keep this a bit flexible as each team could allow underscores or verbs for example, it depends how strict you want to be with your tool :)

Hi there, sorry about the thread necromancy. Question:

What about in the case of linking JIRA tickets for traceability? Are those best included in the body or footer? Having something like fix(JIRA-174): Lorem Ipsum... makes it easier to see at a glance which ticket was primarily addressed in a particular commit.

Do you think that the specification that the scope "must be a noun" is too restrictive in this regard? It would be great to have an example on the spec of including JIRA links for traceability and which section those would be best to be included.

@ozyx commented on GitHub (Apr 24, 2025): > Hey, sorry for the delay! > > Both are technically invalid yes, those MUST be a noun, in general I suggest you to keep this a bit flexible as each team could allow underscores or verbs for example, it depends how strict you want to be with your tool :) Hi there, sorry about the thread necromancy. Question: What about in the case of linking JIRA tickets for traceability? Are those best included in the body or footer? Having something like `fix(JIRA-174): Lorem Ipsum...` makes it easier to see at a glance which ticket was primarily addressed in a particular commit. Do you think that the specification that the scope "must be a noun" is too restrictive in this regard? It would be great to have an example on the spec of including JIRA links for traceability and which section those would be best to be included.
Author
Owner

@bcoe commented on GitHub (May 2, 2025):

What about in the case of linking JIRA tickets for traceability? Are those best included in the body or footer? Having something like fix(JIRA-174): Lorem Ipsum... makes it easier to see at a glance which ticket was primarily addressed in a particular commit.

@ozyx a Jira ticket seems like a thing to me, I think this is a perfectly reasonable use of scope.

The spec is meant to be flexible, you should use it in a way that works well for your team, and just make sure that you document internally.

@bcoe commented on GitHub (May 2, 2025): > What about in the case of linking JIRA tickets for traceability? Are those best included in the body or footer? Having something like fix(JIRA-174): Lorem Ipsum... makes it easier to see at a glance which ticket was primarily addressed in a particular commit. @ozyx a Jira ticket seems like a _thing_ to me, I think this is a perfectly reasonable use of scope. The spec is meant to be flexible, you should use it in a way that works well for your team, and just make sure that you document internally.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/conventionalcommits.org#155