forked from mistweaverco/kulala.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): add linter (mistweaverco#231)
- Loading branch information
1 parent
6b93455
commit 7d347d9
Showing
4 changed files
with
51 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
if ! command -v stylua &> /dev/null; then | ||
echo "stylua is not installed" | ||
exit 1 | ||
fi | ||
|
||
check() { | ||
stylua --version | ||
if [[ -n $1 ]]; then | ||
stylua --check "$1" | ||
else | ||
stylua --check . | ||
fi | ||
} | ||
|
||
main() { | ||
local action="$1" | ||
shift | ||
local args=$* | ||
case $action in | ||
"check") | ||
check "$args" | ||
;; | ||
*) | ||
echo "Invalid action" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
} | ||
main "$@" |
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,6 +1,8 @@ | ||
FROM ubuntu:latest | ||
|
||
RUN apt-get update && apt-get upgrade -y && apt-get install -y curl git gcc lua5.1 luarocks | ||
RUN apt-get update && apt-get upgrade -y && apt-get install -y curl git gcc lua5.1 luarocks unzip | ||
RUN mkdir -p _neovim && curl -sL https://github.com/neovim/neovim/releases/download/v0.10.1/nvim-linux64.tar.gz | tar -xz -C _neovim && mv _neovim/nvim-linux64 /usr/local/nvim && rm -rf _neovim | ||
RUN mkdir -p _stylua && curl -sL https://github.com/JohnnyMorganz/StyLua/releases/download/v0.20.0/stylua-linux-x86_64.zip | funzip > _stylua/stylua && chmod +x _stylua/stylua && mv _stylua/stylua /usr/local/bin/stylua && rm -rf _stylua | ||
RUN luarocks install busted | ||
RUN ln -s /usr/local/nvim/bin/nvim /usr/bin/nvim | ||
RUN ln -s /usr/local/bin/stylua /usr/bin/stylua |