From 8d082f6d9fdad14b8a594e36cfac8c0ad8996930 Mon Sep 17 00:00:00 2001 From: Michael Mogenson Date: Sun, 7 Jan 2024 15:13:45 -0500 Subject: [PATCH] Add github action and change magic shebang --- .github/workflows/lint.yml | 22 ++++++++++++++++++++++ .luarc.json | 8 ++++++++ LuaRepl.app/Contents/MacOS/main.lua | 5 ++--- 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/lint.yml create mode 100644 .luarc.json diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..ef4ee7d --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,22 @@ +--- +name: Lint Code Base +on: + pull_request: ~ + push: + branches: + - main + +jobs: + build: + name: Lint Code Base + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Lint Code Base + uses: mrcjkb/lua-typecheck-action@v0.2.0 + with: + configpath: ".luarc.json" + directories: "." diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 0000000..555eaeb --- /dev/null +++ b/.luarc.json @@ -0,0 +1,8 @@ +{ + "diagnostics": + { + "globals": [], + "neededFileStatus": { "codestyle-check": "Any" }, + }, + "runtime.version": "Lua 5.1", +} diff --git a/LuaRepl.app/Contents/MacOS/main.lua b/LuaRepl.app/Contents/MacOS/main.lua index 84b5489..caa6244 100755 --- a/LuaRepl.app/Contents/MacOS/main.lua +++ b/LuaRepl.app/Contents/MacOS/main.lua @@ -1,10 +1,9 @@ #!/bin/sh -_=[[ +--[[ 2>/dev/null resources="$(dirname "$0")/../Resources" export LUA_PATH="$resources/?.lua;$resources/?/init.lua" exec "$resources/luajit" "$0" "$@" -]] -_ = nil +--]] local objc = require("objc") local repl = require("repl")