Skip to content

common/scripts/lint-commits: fail on merge and fixup commits#58779

Merged
classabbyamp merged 1 commit intovoid-linux:masterfrom
classabbyamp:lint-fixups
Feb 3, 2026
Merged

common/scripts/lint-commits: fail on merge and fixup commits#58779
classabbyamp merged 1 commit intovoid-linux:masterfrom
classabbyamp:lint-fixups

Conversation

@classabbyamp
Copy link
Member

@classabbyamp classabbyamp commented Jan 31, 2026

Testing the changes

  • I tested the changes in this PR: YES
image

@classabbyamp classabbyamp added the xbps-src xbps-src related label Jan 31, 2026
!subject {
if (length > 50) { print "::warning title=Commit Lint::" C ": subject is a bit long" }
if (!($0 ~ ":" || $0 ~ "^Take over maintainership " || $0 ~ "^Orphan ")) { print "::error title=Commit Lint::" C ": subject does not follow CONTRIBUTING.md guildelines"; exit 1 }
if ($0 ~ "^fixup! ") { print "::error title=Commit Lint::" C ": fixup commit included, please squash commits"; exit 1 }
Copy link
Contributor

@Bnyro Bnyro Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there lots of examples where people pushed fixup! commits?

I usually only see something like
Commit A: New package: abc-123
Commit B: Fix changelog and cross-build
Commit C: Update srcpkgs/template/abc
Commit D: Merge master into ...

So it might also make sense to look for ^[Ff]ix and ^Update?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if someone uses git commit --fixup (I do a lot) it adds thosefixup! commits.

we can add other regexes too

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know git has something inbuilt for this.

Good to know, thanks for the explanation :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the other cases you mentioned should be caught by line 51

@Bnyro
Copy link
Contributor

Bnyro commented Feb 1, 2026

I agree that this is addition makes sense, I've seen a lot of cases where people included additional commits instead of squashing.

@classabbyamp classabbyamp merged commit 7588e21 into void-linux:master Feb 3, 2026
@classabbyamp classabbyamp deleted the lint-fixups branch February 3, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

xbps-src xbps-src related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants