diff options
author | chaesngmin <[email protected]> | 2021-09-29 22:44:35 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2021-09-30 07:44:35 +0200 |
commit | 346925fcdcc122702270ca678b5dd1e68820aa00 (patch) | |
tree | 2654e8f523060265331648fe5e8287c99383d462 /CONTRIBUTING.md | |
parent | 35d5615ecc2366ec5de4ce0fecd75fb426216ea0 (diff) |
feat: add commitlint CI (#1459)
Co-authored-by: kylo252 <[email protected]>
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r-- | CONTRIBUTING.md | 72 |
1 files changed, 58 insertions, 14 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fcc415f7..e2a5473b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,6 +15,8 @@ One of the best ways to begin contributing in a meaningful way is by helping fin 3. Link your fork with the repository `git remote add upstream https://github.com/lunarvim/LunarVim.git` 4. That's it ! You can now `git fetch upstream` and `git rebase [-i] upstream/rolling` to update your branches with the latest contributions. +<br /> + ## Setting up development tools ### For editing Lua files @@ -31,21 +33,9 @@ One of the best ways to begin contributing in a meaningful way is by helping fin Install [pre-commit](https://github.com/pre-commit/pre-commit) which will run all linters and formatters for you as a pre-commit-hook. -## Some Guidelines - -### Git Commit Messages - -* Use the present tense ("Add feature" not "Added feature") -* Use the imperative mood ("Move cursor to..." not "Moves cursor to...") -* Limit the first line to 72 characters or less -* Reference issues and pull requests liberally after the first line +<br /> -### Git Branch Naming - -* Name your branches meaningfully, -ex: (feature|bugfix|hotfix)/what-my-pr-does - -### Code +## Code Conventions All lua code is formatted with [Stylua](https://github.com/JohnnyMorganz/StyLua). * Use snake_case @@ -60,6 +50,60 @@ All shell code is formatted according to [Google Shell Style Guide](https://goog shfmt -i 2 -ci -l -d . ``` +<br /> + +## Pull Requests (PRs) + +To avoid duplicate work, create a draft pull request. + +### Commit Messages +* Commit header is limited to 72 characters. +* Commit body and footer is limited to 100 characters per line. + +**Commit header format:** +``` +<type>(<scope>?): <summary> + │ │ │ + │ │ └─> Present tense. 'add something...'(O) vs 'added something...'(X) + │ │ Imperative mood. 'move cursor to...'(O) vs 'moves cursor to...'(X) + │ │ Not capitalized. + │ │ No period at the end. + │ │ + │ └─> Commit Scope is optional, but strongly recommended. + │ Use lower case. + │ 'plugin', 'file', or 'directory' name is suggested, but not limited. + │ + └─> Commit Type: build|ci|docs|feat|fix|perf|refactor|test +``` + +##### Commit Type Guideline + +* **build**: changes that affect the build system or external dependencies (example scopes: npm, pip, rg) +* **ci**: changes to CI configuration files and scripts (example scopes: format, lint, issue_templates) +* **docs**: changes to the documentation only +* **feat**: a new feature for the user +* **fix**: a bug fix +* **perf**: a performance improvement +* **refactor**: a code change that neither fixes a bug nor adds a feature +* **test**: Adding missing tests or correcting existing tests + +**Real world examples:** +``` +feat(quickfix): add 'q' binding to quit quickfix window when focused +``` +``` +fix(installer): add missing "HOME" variable +``` + + +### Branch Naming + +Name your branches meaningfully. + +ex) +```(feature|bugfix|hotfix)/what-my-pr-does``` + +<br /> ## Communication |