Problem: --configpath is resolved relative to the workspace root passed to --check (lua/), not CWD. So .luarc.json was looked up at lua/.luarc.json and not found, leaving vim and jit as undefined globals. Solution: expand to an absolute path with $(pwd) at shell invocation time, matching what the GitHub CI action already does.
10 lines
358 B
Bash
Executable file
10 lines
358 B
Bash
Executable file
#!/bin/sh
|
|
set -eu
|
|
|
|
nix develop --command stylua --check .
|
|
git ls-files '*.lua' | xargs nix develop --command selene --display-style quiet
|
|
nix develop --command prettier --check .
|
|
nix fmt
|
|
git diff --exit-code -- '*.nix'
|
|
nix develop --command lua-language-server --check lua/ --configpath "$(pwd)/.luarc.json" --checklevel=Warning
|
|
nix develop --command busted
|