Skip to content

Commit message starting with # is displayed as an empty commit #49

@aj3sh

Description

@aj3sh
Member

Describe the bug
Commit message starting with # is ignored and is displayed as an empty commit.

To Reproduce
Create a commit starting with '#'.
Eg: "#24 fixed github issue"

commitlint "#24 fixed github issue"

Expected behavior
'#' of the 1st line (commit header) should not be ignored as a comment.

Environment

  • Python version: N/A
  • Package version: v1
  • Operating system: Linux
  • Any other relevant information about your environment.

Additional context
Commitlint output

$ commitlint "#24 fixed github issue"
⧗ Input:


✖ Found 1 error(s).
- Commit message does not follow the Conventional Commits format.

Activity

added
bugSomething isn't working
help wantedExtra attention is needed
on Jun 28, 2024
aj3sh

aj3sh commented on Jul 2, 2024

@aj3sh
MemberAuthor

Additional Findings for the Bug.

  • Git doesn't allow commits starting with # in editor mode.
  • Git commit message can contain comments on the 1st line.

Reference video:
https://github.com/opensource-nepal/commitlint/assets/35629644/25ae5390-4cfa-45b8-98cd-2ea91781fc27

cc: @sugat009

removed their assignment
on Jul 5, 2024
sugat009

sugat009 commented on Jul 5, 2024

@sugat009
Contributor

Let's keep this issue open for now, there might be ways to work around this in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @sugat009@aj3sh

      Issue actions

        Commit message starting with # is displayed as an empty commit · Issue #49 · opensource-nepal/commitlint