Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e441b6e
fix: Better ansi color support
tkolleh Apr 3, 2026
86ba864
fix: Properly handle the sub process
tkolleh Apr 3, 2026
bf513de
chore: Ignore build artifacts
tkolleh Apr 3, 2026
07e03f4
feat: Dependencies added for building an executable
tkolleh Apr 3, 2026
ad1e29f
chore: Ignore the pre-built executable
tkolleh Apr 3, 2026
f9f0b59
feat: Use justfile as an executable document
tkolleh Apr 3, 2026
fb1b527
chore: migrate lux.toml to Lua 5.5, replace argparse with vendored argp
tkolleh Apr 4, 2026
9a5bc7a
feat: vendor argp.lua as argparse replacement for Lua 5.5
tkolleh Apr 4, 2026
052a6f5
feat: migrate Justfile to Lua 5.5 with argp and lx tooling
tkolleh Apr 4, 2026
d8b80ed
fix: align move_to_col_1 test expectation with actual implementation
tkolleh Apr 4, 2026
0c7af44
chore: clean up redundant @module annotations and fix uv.spawn call
tkolleh Apr 4, 2026
9357efd
chore(build): move generated luastatic.c to .build/ directory
tkolleh Apr 4, 2026
3b8b8cd
fix(argp): replace truthy string literal with proper type comparison
tkolleh Apr 4, 2026
e0f1717
chore: address review feedback (argp license, justfile cleanup, lux.t…
tkolleh Apr 4, 2026
5290ff2
chore: modernize Justfile to utilize latest just 1.48.1 features
tkolleh Apr 4, 2026
b49bef5
fix: resolve CI lint warnings and test failures
tkolleh Apr 4, 2026
f6b1e47
fix: add sudo to apt commands in CI
tkolleh Apr 4, 2026
413f027
fix: install just 1.48.1 from GitHub releases in CI
tkolleh Apr 4, 2026
12d72d5
refactor: remove hardcoded lua55_dir path and standardize justfile name
tkolleh Apr 4, 2026
a6587a0
fix: use bash shell in CI to avoid zsh dependency
tkolleh Apr 4, 2026
0a3c128
fix: simplify shell configuration to bash for CI compatibility
tkolleh Apr 4, 2026
bf4a6f8
style: format justfile
tkolleh Apr 4, 2026
1103ca4
fix: extract just tarball to temp directory to avoid overwriting repo…
tkolleh Apr 4, 2026
ffbbfba
chore: add pre-commit hook for code quality checks
tkolleh Apr 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
set -e

echo "Running pre-commit checks..."

# Run code quality checks via just
if command -v just >/dev/null 2>&1; then
just check
else
echo "Error: 'just' command not found. Please install just (https://github.com/casey/just)"
exit 1
fi
21 changes: 18 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,16 @@ jobs:
# because it doesn't run tests (no busted dependency)
version: 0.18.8

- name: Run tests
- name: Install just
run: |
lx --lua-version 5.4 test
mkdir -p /tmp/just
curl -L https://github.com/casey/just/releases/download/1.48.1/just-1.48.1-x86_64-unknown-linux-musl.tar.gz -o /tmp/just/just.tar.gz
tar -xzf /tmp/just/just.tar.gz -C /tmp/just
sudo mv /tmp/just/just /usr/local/bin/
rm -rf /tmp/just

- name: Run tests
run: just test-ci

lint:
name: Lint & Format
Expand All @@ -40,10 +47,18 @@ jobs:
# See comment in test job above for version pinning rationale
version: 0.18.8

- name: Install just
run: |
mkdir -p /tmp/just
curl -L https://github.com/casey/just/releases/download/1.48.1/just-1.48.1-x86_64-unknown-linux-musl.tar.gz -o /tmp/just/just.tar.gz
tar -xzf /tmp/just/just.tar.gz -C /tmp/just
sudo mv /tmp/just/just /usr/local/bin/
rm -rf /tmp/just

- name: Check formatting
run: |
lx fmt
git diff --exit-code || (echo "::error::Code is not formatted. Run 'lx fmt' locally and commit the changes." && exit 1)

- name: Run linter
run: lx --lua-version 5.4 lint
run: just lint-ci
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ luacov.report.out

# Demo recording
*.cast

# Build artifacts
.build/
/roda
bin_spin.luastatic.c
spin.luastatic.c
lua/spin.luastatic.c
*.luastatic.c
95 changes: 95 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
-- luacheck configuration for roda.lua
-- Treat all warnings as errors by default
-- but ignore some stylistic warnings

ignore = {
"212", -- deep nesting
"213", -- long line (over 120 chars)
"211", -- line contains only whitespace
"111", -- setting non-standard global variable
"112", -- mutating non-standard global variable
"113", -- accessing undefined variable
"421", -- variable defined but not used (handled by unused argument detection)
}

-- Files to check
files = {
"**/*.lua",
"!**/_spec.lua", -- exclude test files from some checks
}

-- Global variables that are allowed
globals = {
"arg", -- command line arguments
"io",
"package",
"string",
"table",
"os",
"debug",
"math",
"coroutine",
"utf8",
"jit",
"bit",
"bit32",
"_G",
"_VERSION",
"require",
"setmetatable",
"getmetatable",
"pairs",
"ipairs",
"next",
"type",
"tostring",
"tonumber",
"assert",
"error",
"pcall",
"xpcall",
"rawget",
"rawset",
"rawequal",
"select",
"unpack",
"print",
"collectgarbage",
"dofile",
"load",
"loadfile",
"loadstring",
"module",
"setfenv",
"getfenv",
"newproxy",
"spawn",
"uv", -- luv library
"busted", -- test framework
"describe",
"it",
"before_each",
"after_each",
"setup",
"teardown",
"pending",
"assert",
"mock",
"stub",
"spy",
}

-- Maximum line length
max_line_length = 120

-- Maximum number of consecutive empty lines
max_empty_lines = 2

-- Allow unused arguments that start with underscore
allow_unused = {"^_"} -- matches `_` and `_err` etc.

-- Allow unused loop variables
unused_args = false

-- Check globals defined in other modules
check_globals = false
Loading
Loading