Commit Messages
See the Contributing Guide for more information on making changes to McFACTS.
Conventional Commits is a formatting convention that enables us to easily
review the code’s history
automatically generate our changelog
Please follow these guidelines when committing changes as you work on McFACTS.
Formatting Template
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
See Examples below for…examples.
Message Subject
The first line cannot be longer than 70 characters. The second line is always blank, and other lines should be no
longer than 80 characters.
The type and scope must be lower case.
<type> must be one of:
feat– a new feature is introduced with the changesfix– a bug fix has occurredchore– changes that do not relate to a fix or feature and don’t modify src or test files (for example updating dependencies)refactor– refactored code that neither fixes a bug nor adds a featuredocs– updates to documentation such as a the README or other markdown filesstyle– changes that do not affect the meaning of the code, likely related to code formatting such as white-space, missing semi-colons, and so on.test– including new or correcting previous testsperf– performance improvementsci– continuous integration relatedbuild– changes that affect the build system or external dependenciesrevert– reverts a previous commitmerge- use when manually merging two branches
[scope] examples:
phys- physicsio- input/outputvis- visualizationsetupext- external module interfacesetc.
<description> should be:
present tense
gramatically structured to complete the sentence, “If applied, this commit will _____.”
The [optional body] can be used to include additional details when necessary, and [optional footer(s)] should be used when the change addresses a reported issue, Closes #123).
See References and Resources for examples.
Examples
Commit message meeting the minimum requirements
style: correct whitespace usage in solve_disk function
Commit message with the optional scope
fix(setup): change sign for binary formation under Snoopy criterion
Commit message with an optional scope and body
feat(phys): treat disk capture with Luffy and Zaraki methods
1. follow Luffy et al. 1999 under X conditions
2. follow Zaraki et al. 2005 under Y, and Z conditions
Badness 1000
updated things again
This one does not follow the format, is not descriptive, and leaves me as a reviewer/bug hunter with a few questions:
Did you update the spherical cow approximation for calculating the coriolis force?
Was this a simple change to the sign of the integer flag that sets chirality?
What did you do last time since you said “again”?