-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
627 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,36 @@ | ||
GREEN="\033[00;32m" | ||
RESTORE="\033[0m" | ||
|
||
# mock directory accessible by `vim.env.MOCK_DIR` | ||
MOCK_DIR="./tests/mocks" | ||
|
||
# make the output of the message appear green | ||
define style_calls | ||
$(eval $@_msg = $(1)) | ||
echo ${GREEN}${$@_msg} | ||
echo ${RESTORE} | ||
endef | ||
|
||
.PHONY: test test-nvim lint style-lint format | ||
|
||
test: | ||
@printf "%s\nRunning tests using vusted\n" | ||
@vusted ./tests | ||
@$(call style_calls,"Running vusted tests") | ||
@MOCK_DIR=${MOCK_DIR} vusted ./tests | ||
|
||
test-nvim: | ||
@printf "\nRunning tests using nvim\n" | ||
@nvim --headless --noplugin -u tests/minimal_init.lua -c "PlenaryBustedDirectory tests/freeze-code {minimal_init = 'tests/minimal_init.lua', sequential = true}" | ||
@$(call style_calls,"Running tests using nvim") | ||
@MOCK_DIR=${MOCK_DIR} nvim --headless --noplugin -u tests/minimal_init.lua -c "PlenaryBustedDirectory tests/freeze-code {minimal_init = 'tests/minimal_init.lua'}" | ||
|
||
lint: style-lint | ||
@printf "\nRunning selene\n" | ||
@$(call style_calls,"Running selene") | ||
@selene --display-style quiet --config ./selene.toml lua/freeze-code | ||
|
||
style-lint: | ||
@printf "\nRunning stylua check\n" | ||
@$(call style_calls,"Running stylua check") | ||
@stylua --color always -f ./stylua.toml --check lua/freeze-code | ||
|
||
format: | ||
@printf "\nRunning stylua format\n" | ||
@$(call style_calls,"Running stylua format") | ||
@stylua --color always -f ./stylua.toml lua/freeze-code | ||
|
||
all: test test-nvim lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
function! health#freeze_code#check() | ||
lua require("freeze-code.health").check() | ||
endfunction |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.