This file describe rules that must be applied to commit code to ReferenceFrameRotations.jl.
Notice that this document is under construction.
The following list of best practices should be considered when creating commits for this project:
- The commits should be incremental. Try to avoid very big changes within just one commit.
- The overall state of the software must be as functional as possible between two commits. Try to avoid commits that break the entire software if another commit is not applied.
The commit message must have the following structure:
<EMOJI> Short summary of changes
-- BLANK LINE --
More detailed explanatory text, if necessary. Wrap it to 67
characters. In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body. The
blank line separating the summary from the body is critical (unless
you omit the body entirely); tools like rebase can get confused if
you run the two together.
Further paragraphs come after blank lines.
- Bullet points are okay, too.
- Typically a hyphen or asterisk is used for the bullet, preceded
by a single space, with blank lines in between, but conventions
vary here.
Source: Adapted from http://git-scm.com/book/ch5-2.html
Notice that:
- The short summary must be less than 50 characters. The emojis, if present, count as 1 character each.
- Don't end the summary with a period.
- If the summary indicates an action, then if must be written in imperative form. Hence, write "Fix ...", "Change ...", and "Add ...", instead of "Fixed ...", "Changed ...", or "Added ...".
- It is preferred that only one emoji is used per commit.
- All the phrases in the explanatory text must be punctuated.
- If there is an explanatory text, a blank line must exist between the short summary of changes and the explanatory text.
- The is no limit for the detailed explanatory text, but it must be wrap to 72 characters.
Emojis can be used to improve the understanding about the commit. It can be used at the beginning of the commit message to indicate what kind of modification the commit does. The following table describe some situations:
Commit Type | Emoji |
---|---|
Initial Commit | 🎉 :tada: |
Version Tag | 🔖 :bookmark: |
New Feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
Refactoring | 📦 :package: |
Documentation | 📚 :books: |
Internationalization | 🌐 :globe_with_meridians: |
Performance | 🐎 :racehorse: |
Cosmetic | 💄 :lipstick: |
General improvements | 🔧 :wrench: |
Tests | 🚨 :rotating_light: |
Deprecation | 💩 :poop: |
Work In Progress (WIP) | 🚧 :construction: |
Warning | :warning: |
Code style | 🎨 :art: |
Other | See here |
Note: If the commit contains an important warning, such as a breaking change, then the emoji :warning:
must be added to the commit title. In this case, two emojis can be used.