Skip to content

Complete repository-wide Lua formatting and lint baseline #5

Closed

Description

@jatmn

PR #4 added Lua validation but deliberately deferred the repository-wide formatting and lint baseline. It has now merged; CI currently checks only added/modified Lua files on both pull requests and relevant pushes to main, so untouched legacy files have not been brought into compliance.

The development guide explicitly records this deferred work. This issue tracks that follow-up separately from the CI installation and the Factorio 2.1 compatibility work in #3.

Scope

  • Format every tracked Lua file with StyLua 2.5.2 using the root .stylua.toml.
  • Resolve the existing Luacheck 1.2.0 warnings across tracked Lua files using the existing Lua 5.2/Factorio configuration. Preserve intentional shared exports; any configuration exception must be narrow and justified, rather than a blanket warning suppression.
  • Preserve gameplay, prototype values, assets, release metadata and license notices. Keep mechanical formatting separate from any necessary lint repairs so behavioral equivalence is reviewable.
  • Once the full baseline passes, make relevant main pushes check all tracked Lua files, while retaining changed-file checks for pull requests as described in the development guide. Preserve NUL-delimited filename handling, option termination, deletion/type-change handling and independent push concurrency.
  • Update contributor/development guidance and affected routing/selection regression tests to match the completed enforcement policy.

Acceptance criteria

  • Every tracked Lua file passes Lua 5.2 syntax, Luacheck 1.2.0 and StyLua 2.5.2 formatting checks with the committed configuration.
  • Baseline repairs have no unrelated gameplay, asset or version changes and introduce no blanket lint suppressions.
  • Relevant main pushes enforce the full Lua baseline; pull requests retain their documented changed-file selection. Regression evidence covers both event policies and existing filename/selection safeguards.
  • Existing CI-routing, owner-authorization and package regression suites pass; the mod ZIP builds and validates.
  • Documentation no longer describes the completed baseline as deferred, and the implementation PR reports validation results and any behavioral testing needed for non-mechanical repairs.

Full-file checks from the repository root:

git ls-files -z -- '*.lua' | xargs -0 -r -n1 luac5.2 -p --
git ls-files -z -- '*.lua' | xargs -0 -r luacheck --
git ls-files -z -- '*.lua' | xargs -0 -r stylua --check --config-path .stylua.toml --

Related: #4 (CI installation, merged), #3 (separate Factorio 2.1 port).

Activity

  1. Repository owner deleted a comment from pullfrog on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions