test: add headless test framework
This commit is contained in:
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -uo pipefail
|
||||
|
||||
cd "$(dirname "$0")/.." || exit 1
|
||||
|
||||
emmylua_check --output-format=json . 2> >(grep -v '^Check finished$' >&2) \
|
||||
| jq -r '
|
||||
.[]
|
||||
| .file as $f
|
||||
| .diagnostics[]
|
||||
| "\($f):\(.range.start.line + 1):\(.range.start.character + 1)"
|
||||
+ ": \(["error","warning","info","hint"][.severity-1])"
|
||||
+ ": \(.message | rtrimstr(" ")) [\(.code)]"
|
||||
' \
|
||||
| sed "s|^$PWD/||"
|
||||
|
||||
exit "${PIPESTATUS[0]}"
|
||||
Reference in New Issue
Block a user