Skip to content

Commit 4fe03a2

Browse files
authored
Merge pull request #149 from gierens/contributing
Add guidelines for commit messages
2 parents 10e2a96 + a293fa2 commit 4fe03a2

File tree

1 file changed

+77
-1
lines changed

1 file changed

+77
-1
lines changed

CONTRIBUTING.md

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,85 @@
11
# Contributing
2-
This document is heavily WIP.
32

43
If you wanna contribute to `eza`, here are the absolute basics:
54
- your commit summary should follow conventional commits.
65
- your commits should be separated into small, logical chunks.
76
- reviewers may ask you to rebase your commits into more sensible chunks.
87
- your PR will need to pass CI and local `cargo test`.
98
- you may be asked to refactor parts of your code by reviewers.
9+
10+
## Commit Messages
11+
A common commit message contains at least a summary and reference with
12+
closing action to the corresponding issue if any, and may also include a
13+
description and signature.
14+
15+
### Summary
16+
For you commit messages, please use the first line for a brief summary what
17+
the commit changes. Try to stay within the 72 char limit and prepend what type
18+
of change. See the following list for some guidance:
19+
- feat: adds a new feature to eza
20+
- feat(zsh): adds something to zsh completion
21+
- refactor: revises parts of the code
22+
- doc(readme): revise the README
23+
- doc(man): revision of the man pages
24+
- fix: bugfix in the code base
25+
- fix(ci): bugfix in the continuos integration
26+
- ...
27+
28+
Note that this list is not complete and there may be cases where a commit
29+
could be characterized by different types, so just try to make your best
30+
guess. This spares the maintainers a lot of work when merging your PR.
31+
32+
### Description
33+
If you commit warrants it due to complexity or external information required
34+
to follow it, you should add a more detailed description of the changes,
35+
reasoning and also link external documentation if necessary. This description
36+
should go two lines below the summary and except for links stay in the 80 char
37+
limit.
38+
39+
### Issue Reference
40+
If the commit resolves an issue add: `Resolves #abc` where `abc` is the issue
41+
number. In case of a bugfix you can also use `Fixes #abc`.
42+
43+
### Signature
44+
You may add a signature at the end two lines below the description or
45+
issue reference.
46+
47+
### Example
48+
Here is an example of a commit message that follows these rules (mostly):
49+
```
50+
fix: TextCell building of detailed grid view for hyperlink and icon options
51+
52+
The hyperlink option adds an escape sequence which in the normal TextCell
53+
creation also becomes part of the length calculation. This patch applies
54+
the same logic the normal grid already did, by using the filenames bare
55+
width when a hyperlink is embedded. It also respects the ShowIcons
56+
option just like the normal grid view.
57+
58+
Resolves #129
59+
```
60+
61+
### Additional Examples
62+
63+
- feat: add column selection
64+
- fix(output): fix width issue with columns
65+
- test(fs): add tests for filesystem metadata
66+
- feat!: breaking change / feat(config)!: implement config file
67+
- chore(deps): update dependencies
68+
69+
### Commit types
70+
71+
- build: Changes that affect the build system or external dependencies (example libgit2)
72+
- ci: Changes to CI configuration files and scripts (example scopes: Nix, Vagrant, Docker)
73+
- chore: Changes which do not change source code or tests (example: changes to the build process, auxiliary tools, libraries)
74+
- docs: Documentation, README, completions, manpage only
75+
- feat: A new feature
76+
- fix: A bug fix
77+
- perf: A code change that improves or addresses a performance issue
78+
- refactor: A code change that neither fixes a bug nor adds a feature
79+
- revert: Revert something
80+
- style: Changes that do not affect the meaning of the code (example: clippy)
81+
- test: Adding missing tests or correcting existing tests
82+
83+
### Reminders
84+
Put newline before extended commit body
85+
More details at conventionalcommits.org

0 commit comments

Comments
 (0)