Skip to content

Latest commit

 

History

History
122 lines (95 loc) · 7.01 KB

CONTRIBUTING.md

File metadata and controls

122 lines (95 loc) · 7.01 KB

Contributing guide

This document serves as a checklist before contributing to this repository. It includes links to read up on if topics are unclear to you.

This guide mainly focuses on the proper use of Git.

1. Before opening an issue

To report a bug/request please file an issue in the right repository (example for Arduino_Core_STM32). But check the following boxes before posting an issue:

Repositories Projects
STM32 Core Arduino core support for STM32 based boards
STM32 Tools Contains several tools (upload, scripts,...)
STM32 Examples Arduino library to provide examples related to STM32
Board Manager Files Storage for Arduino Boards Manager JSON file
CMSIS module Mainly storage
SVD Files Mainly storage
STM32 Libraries for Arduino IDE Search on the STM32duino GitHub repository

2. Posting the issue

When you have checked the previous boxes. Please consider the following points before posting the issue.

  • Describe the issue based on the behaviour you were expecting
  • Post complete error messages using markdown code fencing: Markdown Code Fencing Example
  • Provide a full set of steps necessary to reproduce the issue
  • Demonstration code should be complete, correct and the minimum amount necessary to reproduce the issue

3. Pull Requests

About Pull Requests

4. Commit messages

An easy to read pull request will speed up the merging process. Your commit messages need to be logically separate. And containing enough information on their own. When this is done consistently your pull request will have an easy to read log of changes.

Your commits need to be atomic which allows the repository to remain flexible after merging.

Commit messages follow the Conventional Commits format:

<type>(<scope>): <summary>

The scope is optional.

  • type: feat, fix, perf, refactor, docs, ci, build, chore, style, test or revert.
  • scope: the area touched, for example core, system, uart, usb, i2c, spi, timer, cmake, ci, docs, variants (or the STM32 series in lowercase such as h5, c5, wl3 for series-wide changes). Check git log to reuse the scopes already in use.
  • A breaking change is marked with ! before the colon (feat(api)!: ...) or with a BREAKING CHANGE: footer.

If you did not read the following 7 points before or just want to fresh up. Please read up on them on this website by Chris Beams. They apply with the adaptations listed in points 2, 3 and 5.

  1. Separate subject from body with a blank line
  2. Limit the subject line (first line) to 50 characters if possible, 72 at most (the type(scope): prefix counts)
  3. Start the summary after the prefix with a lowercase letter (except for acronyms and identifiers such as HAL or I3C)
  4. Do not end the subject line with a period (.)
  5. Use the imperative mood in the subject line. This should be in the written as giving an instruction for example "fix save-as bug" (it shows what the PR achieves when merging it)
  6. Wrap body at 72 characters
  7. Use the body to explain what, why and how

Every commit must be signed off (git commit -s). This adds a Signed-off-by: Your Name <[email protected]> trailer.

If an AI assistant helped to write the change, add an Assisted-by: <tool>: <model> trailer (for example Assisted-by: GitHub Copilot: claude-sonnet-5.5). Do not use Co-authored-by: for this, it is reserved for human co-authors. You remain responsible for the change and must review it before submitting. If your pull request fixes, closes or resolves an issue please reference it in the body with the following syntax. Also see the last lines of the following example. For an issue of another repository use the full form owner/repo#123.

A general example with these guidelines in mind is shown below:

fix(uart): use no parity for the debug UART

More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. The blank line separating the summary from the
body is critical (unless you omit the body entirely); various tools
like `log`, `shortlog` and `rebase` can get confused if you run the
two together.

Explain the problem that this commit is solving. Focus on why you
are making this change as opposed to how (the code explains that).
Are there side effects or other unintuitive consequences of this
change? Here's the place to explain them.

Further paragraphs come after blank lines.

 - Bullet points are okay, too

If you use an issue tracker, put references to them at the bottom,
like this:

Fixes: #123
Refs: #456, #789
Assisted-by: GitHub Copilot: claude-sonnet-5.5
Signed-off-by: Your Name <[email protected]>

5. Rebasing pull requests

When different people are working on the Arduino project simultaneously, pull requests can go stale quickly. A "stale" pull request is one that is no longer up to date with the latest merges in the project. It needs to be updated before it can be merged.

Most often pull requests become stale when merge conflicts occur. This happens when two pull requests both modify similar lines in the same file and one gets merged, the unmerged request will now have a merge conflict and needs updating.

When your pull request is stale, you will need to rebase your branch on the current main branch before you can merge it without conflicts.

More information about rebasing can be found at the repository of edX.

6. Merged!

When your pull request is merged please update the documentation if the changes require it Documentation