Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add gitlint #590

Merged

Conversation

rettichschnidi
Copy link
Contributor

@rettichschnidi rettichschnidi commented Apr 21, 2021

This is a fairly default configuration, which, among other stuff, checks for the subject line being 72 or less characters is required by the Eclipse project handbook.

Non-default rules:

  • Enforce at least 20 characters in the commit body
  • Disallow the word "fixup" in the title messages. Intended to prevent accidents like d31d026.

In case any of those rules get in the way, use the "gitlint-ignore" tag in the commit message to suppress gitlint findings for this specific commit. To configure a rule permanently, adapt .gitlint.

The GitHub Action runs only on PRs, not after each push. The idea is to prevent annoyance when working on code, using WIP or other non-compliant commit messages.

Ideas to test this PR locally:

  • Create a new branch (derived from this one), add some good, some sloppy commits, then run tools/ci/run_ci.sh --run-gitlint on it
  • Run the checker on the last 100 commits: tools/ci/run_ci.sh --run-gitlint --branch-source HEAD --branch-target HEAD~100

@sbernard31
Copy link
Contributor

The Signed-off-by is not longer required by eclipse foundation.

But I guess project can make it mandatory, if wanted anyway. So it's up to you to decide.

@rettichschnidi
Copy link
Contributor Author

The Signed-off-by is not longer required by eclipse foundation.

But I guess project can make it mandatory, if wanted anyway. So it's up to you to decide.

If no longer needed for IP checking, I can not see the benefit of it anymore and will remove the check.

@rettichschnidi rettichschnidi force-pushed the gardena/rs/add-gitlint branch 3 times, most recently from 00852c7 to e794c6c Compare April 21, 2021 15:00
@rettichschnidi rettichschnidi marked this pull request as ready for review April 21, 2021 15:02
@rettichschnidi rettichschnidi mentioned this pull request Apr 21, 2021
Copy link

@qleisan qleisan left a comment

Choose a reason for hiding this comment

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

LGTM (quick review)

This is a fairly default configuration, which, among other stuff,
checks for the subject line being 72 or less characters as required by
the Eclipse project handbook.

Non-default rules:
- Enforce at least 20 characters in the commit body
- Disallow the word "fixup" in the title messages. Intended to prevent
  accidents like d31d026.

In case any of those rules get in the way, use the "gitlint-ignore" tag
in the commit message to suppress gitlint findings for this specific
commit. To configure a rule permanently, adapt .gitlint.

The GitHub Action runs only on PRs, not after each push. The idea is to
prevent annoyance when working on code, using WIP or other non-compliant
commit messages.
@rettichschnidi rettichschnidi merged commit 8218ddc into eclipse-wakaama:master Apr 21, 2021
@rettichschnidi rettichschnidi deleted the gardena/rs/add-gitlint branch April 21, 2021 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants