ci: add quality to contributing
This commit is contained in:
@@ -4,31 +4,51 @@ Thank you for contributing.
|
||||
|
||||
See [Development](https://github.com/nvim-tree/nvim-tree.lua/wiki/Development) for environment setup, tips and tools.
|
||||
|
||||
# Quality
|
||||
|
||||
The following quality checks are mandatory and are performed during CI:
|
||||
|
||||
## Styling and formatting
|
||||
|
||||
Code is formatted using luacheck, and linted using stylua.
|
||||
You can install these with:
|
||||
You may install these via your package manager or with:
|
||||
|
||||
```bash
|
||||
luarocks install luacheck
|
||||
cargo install stylua
|
||||
```
|
||||
|
||||
Run:
|
||||
```sh
|
||||
stylua lua
|
||||
luacheck lua
|
||||
```
|
||||
|
||||
You can setup the git hooks by running `scripts/setup-hooks.sh`.
|
||||
|
||||
## Adding new actions
|
||||
## Check
|
||||
|
||||
[luals](https://luals.github.io) check is run with:
|
||||
|
||||
```sh
|
||||
scripts/luals-check.sh
|
||||
```
|
||||
|
||||
Requires `lua-language-server` on your path.
|
||||
|
||||
# Adding new actions
|
||||
|
||||
To add a new action, add a file in `actions/name-of-the-action.lua`. You should export a `setup` function if some configuration is needed.
|
||||
Once you did, you should run the `scripts/update-help.sh`.
|
||||
|
||||
## Documentation
|
||||
# Documentation
|
||||
|
||||
When adding new options, you should declare the defaults in the main `nvim-tree.lua` file.
|
||||
Once you did, you should run the `scripts/update-help.sh`.
|
||||
|
||||
Documentation for options should also be added to `nvim-tree-opts` in `doc/nvim-tree-lua.txt`
|
||||
|
||||
## Pull Request
|
||||
# Pull Request
|
||||
|
||||
Please reference any issues in the description e.g. "resolves #1234".
|
||||
|
||||
|
||||
Reference in New Issue
Block a user