Skip to content

Conversation

@keithharvey
Copy link
Contributor

@keithharvey keithharvey commented Nov 20, 2025

This PR adds automatic formatting and type checking to BAR. It is downstream of Unit Test Bootstrapping.

When to Merge

This is a PR for after Lux becomes required.

Before Merge

Merge this at the end of a weekly merge session.

Before merging, check out the branch and run lx fmt, then do some cursory testing.

Include lux and add the busted and luassert test dependencies. Lux seems
 like it is set to become the de facto package manager for lua and it is
 also not luarocks.
Add the busted unit testing framework with example specs, installation
docs, and legal licensing. Includes luassert for assertion DSL.

Key features:
- Builder pattern for mock construction with fluent interfaces
- Spring repository wrapper for dependency injection. Includes helpers
like WithAlliance,
AddTeamResources, and mod option support. Allows loading global
dependent code in test closures.
- Team builder for configuring team properties
- Global state isolation with WithGlobalsDefined helper

Busted needs to load project dirs in `.busted`. This is necessary
because lx expects a `src/` folder matching lua package structure.
Add separate format and lint github workflows to automatically format and fail PRs with non-stylistic type errors. Also add git hook instructions to the README (recommended to devs)
@keithharvey keithharvey changed the title Fmt/Lint Workflows Fmt/Lint Github Workflows Nov 20, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 20, 2025

Test Results

14 tests  ±0   7 ✅ ±0   9s ⏱️ ±0s
 1 suites ±0   7 💤 ±0 
 1 files   ±0   0 ❌ ±0 

Results for commit d764c6c. ± Comparison against base commit 8ee8f1b.

♻️ This comment has been updated with latest results.

@keithharvey keithharvey marked this pull request as draft November 20, 2025 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant