Skip to content

Commit cbc3158

Browse files
committed
Update makefile
1 parent f87b53e commit cbc3158

File tree

2 files changed

+13
-26
lines changed

2 files changed

+13
-26
lines changed

Makefile

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
.PHONY: test
1+
.PHONY: test test-file install-hooks check clean autogen
2+
23
test:
34
nvim --headless --noplugin -u test/minimal_init.lua -c "lua require(\"plenary.test_harness\").test_directory_command('test/spec {minimal_init = \"test/minimal_init.lua\"}')"
4-
.PHONY: test-file
5+
56
test-file:
67
nvim --headless --noplugin -u test/minimal_init.lua -c "lua require(\"plenary.busted\").run(\"$(FILE)\")"
78

8-
.PHONY: install-hooks
99
install-hooks:
1010
pre-commit install --install-hooks
11-
.PHONY: check
11+
1212
check:
1313
pre-commit run --all-files
1414

1515
clean:
1616
rm -rf .tests/
1717

1818
# do not run manually! (runs via CI)
19-
.PHONY: autogen
2019
autogen:
2120
bash scripts/autogen.sh

doc/CONTRIBUTING.md

+9-21
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,27 @@
33
## General
44

55
- 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)
610

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.
1813

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.
1917
- Use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
2018
style for your commits.
21-
2219
- Squash your commits so that one commit represents one complete change.
23-
2420
- Mark your PR as WIP until it's ready to merge.
25-
2621
- Make sure tests are passing by running `make test` in the root of the project.
2722
Smaller features / fixes should have unit test coverage, and larger features
2823
should have E2E coverage.
29-
3024
- We use Plenary's test suite, which uses a stripped-down version of
3125
[busted](https://github.com/Olivine-Labs/busted). If you're unsure how to
3226
write tests for your PR, please let us know and we can help.
33-
3427
- To format Lua code blocks in our Markdown documentation, we recommend
3528
[cbfmt](https://github.com/lukas-reineke/cbfmt), which is available as a
3629
null-ls built-in.
@@ -39,20 +32,15 @@
3932

4033
- Check if there is an open issue requesting the built-in you are adding and
4134
mention in your PR that it closes any relevant issue(s).
42-
4335
- Check other built-in sources for examples and, whenever possible, use helpers
4436
to reduce the number of lines of code in your PR.
45-
4637
- A built-in source's arguments are the minimal arguments required for the
4738
source to work. Leave out non-essential arguments.
48-
4939
- Built-in sources should target the latest available version of the underlying
5040
program unless there is a compelling and widespread reason to use an older
5141
version. If older versions require different arguments, mention that in the
5242
documentation. If they require a different parser, create a separate built-in.
53-
5443
- Make sure your built-in source has a `name`.
55-
5644
- If the source doesn't use `generator_factory` to spawn an external command,
5745
define a `can_run` field to verify if the plugin is installed. Note that this
5846
is only necessary for clarification when `:checkhealth` is run. For example,

0 commit comments

Comments
 (0)