Contributions are more than welcome!
Please don't forget to add your changes to the "Unreleased" section of the changelog (if applicable).
This project uses Conventional Commits.
I use
nix
for development and testing.stylua
,.editorconfig
, andalejandra
for formatting.luacheck
, andmarkdownlint
, for linting.sumneko-lua-language-server
for static type checking.
This plugin uses busted
for testing.
The best way to run tests is with Nix (see below),
because this includes tests that take different
envrionments into account (e.g. with/without fast-tags
, hoogle
, ...).
If you do not use Nix, you can run a basic version of the test suite using
luarocks test
.
For more information, see the neorocks tutorial.
To enter a development shell:
nix-shell
or (with flakes enabled)
nix develop
To apply formatting, while in a devShell, run
pre-commit run --all
If you use direnv
,
just run direnv allow
and you will be dropped in this devShell.
To run tests locally
nix-build -A haskell-tools-test
or (with flakes enabled)
nix build .#checks.<your-system>.haskell-tools-test --print-build-logs
For formatting and linting:
nix-build -A pre-commit-check
or (with flakes enabled)
nix build .#checks.<your-system>.formatting --print-build-logs
If you have flakes enabled and just want to run all checks that are available, run:
nix flake check --print-build-logs