|
3 | 3 | ## General
|
4 | 4 |
|
5 | 5 | - Before committing, please go through the following steps:
|
| 6 | + 1. Lint Lua files with [selene](https://github.com/Kampfkarren/selene) |
| 7 | + 2. Format Lua files with [StyLua](https://github.com/JohnnyMorganz/StyLua) |
| 8 | + 3. If you've updated documentation, format Markdown files with |
| 9 | + [Prettier](https://github.com/prettier/prettier) |
6 | 10 |
|
7 |
| -1. Lint Lua files with [selene](https://github.com/Kampfkarren/selene) |
8 |
| -2. Format Lua files with [StyLua](https://github.com/JohnnyMorganz/StyLua) |
9 |
| -3. If you've updated documentation, format Markdown files with |
10 |
| - [Prettier](https://github.com/prettier/prettier) |
11 |
| - |
12 |
| - All are available as null-ls built-ins. Failing to lint and format files will |
13 |
| - cause CI failures, which will prevent your PR from getting merged. |
14 |
| - |
15 |
| - Optionally, you can install |
16 |
| - [Pre-Commit](https://pre-commit.com/index.html#install) hooks by cloning the |
17 |
| - project and running `make install-hooks` to locally enforce checks on commit. |
| 11 | + All are available as null-ls built-ins. Failing to lint and format files will |
| 12 | + cause CI failures, which will prevent your PR from getting merged. |
18 | 13 |
|
| 14 | + Optionally, you can install |
| 15 | + [Pre-Commit](https://pre-commit.com/index.html#install) hooks by cloning the |
| 16 | + project and running `make install-hooks` to locally enforce checks on commit. |
19 | 17 | - Use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
|
20 | 18 | style for your commits.
|
21 |
| - |
22 | 19 | - Squash your commits so that one commit represents one complete change.
|
23 |
| - |
24 | 20 | - Mark your PR as WIP until it's ready to merge.
|
25 |
| - |
26 | 21 | - Make sure tests are passing by running `make test` in the root of the project.
|
27 | 22 | Smaller features / fixes should have unit test coverage, and larger features
|
28 | 23 | should have E2E coverage.
|
29 |
| - |
30 | 24 | - We use Plenary's test suite, which uses a stripped-down version of
|
31 | 25 | [busted](https://github.com/Olivine-Labs/busted). If you're unsure how to
|
32 | 26 | write tests for your PR, please let us know and we can help.
|
33 |
| - |
34 | 27 | - To format Lua code blocks in our Markdown documentation, we recommend
|
35 | 28 | [cbfmt](https://github.com/lukas-reineke/cbfmt), which is available as a
|
36 | 29 | null-ls built-in.
|
|
39 | 32 |
|
40 | 33 | - Check if there is an open issue requesting the built-in you are adding and
|
41 | 34 | mention in your PR that it closes any relevant issue(s).
|
42 |
| - |
43 | 35 | - Check other built-in sources for examples and, whenever possible, use helpers
|
44 | 36 | to reduce the number of lines of code in your PR.
|
45 |
| - |
46 | 37 | - A built-in source's arguments are the minimal arguments required for the
|
47 | 38 | source to work. Leave out non-essential arguments.
|
48 |
| - |
49 | 39 | - Built-in sources should target the latest available version of the underlying
|
50 | 40 | program unless there is a compelling and widespread reason to use an older
|
51 | 41 | version. If older versions require different arguments, mention that in the
|
52 | 42 | documentation. If they require a different parser, create a separate built-in.
|
53 |
| - |
54 | 43 | - Make sure your built-in source has a `name`.
|
55 |
| - |
56 | 44 | - If the source doesn't use `generator_factory` to spawn an external command,
|
57 | 45 | define a `can_run` field to verify if the plugin is installed. Note that this
|
58 | 46 | is only necessary for clarification when `:checkhealth` is run. For example,
|
|
0 commit comments