MCPcopy Index your code
hub / github.com/JohnnyMorganz/stylua-action

github.com/JohnnyMorganz/stylua-action @v5.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v5.0.0 ↗ · + Follow
9 symbols 18 edges 4 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

StyLua GitHub Action stylua-action status

GitHub Action to run StyLua, a Lua code formatter.

Installs the StyLua binary (from GitHub releases), and caches it. Any StyLua command can then be run.

NOTE: We recommend using a toolchain manager such as aftman to manage StyLua, as it allows you to define the version used throughout your project - both on the command line, and in GitHub actions.

Usage

- uses: actions/checkout@v4
- uses: JohnnyMorganz/stylua-action@v4
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    version: latest # NOTE: we recommend pinning to a specific version in case of formatting changes
    # CLI arguments
    args: --check .

If you would just like to install stylua, but not run it (e.g., since it is used as part of a wider CI script), then you can set args: false:

- uses: actions/checkout@v4
- uses: JohnnyMorganz/stylua-action@v4
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    version: latest # NOTE: we recommend pinning to a specific version in case of formatting changes
    # This disables running `stylua`
    args: false
  # Run stylua independently
- run: |
    stylua --version

Parameters

token (Required)

GitHub token. Required since the binary is downloaded from GitHub releases (to speed download)

args (Required)

The arguments to pass to the StyLua binary. If you don't want to run the binary, set args: false.

version (Required)

The version of StyLua to use. Follows semver syntax. Alternatively, supply latest to use the latest available release.

NOTE: using latest may cause the action to fail if StyLua updates and the formatting changes!

Based off https://github.com/Roblox/setup-foreman, licensed under MIT

Extension points exported contracts — how you extend this code

GitHubAsset (Interface)
(no doc)
src/stylua.ts
GitHubRelease (Interface)
(no doc)
src/stylua.ts

Core symbols most depended-on inside this repo

getFilenameMatcher
called by 2
src/stylua.ts
run
called by 1
src/main.ts
getAssetFilenamePatternForPlatform
called by 1
src/stylua.ts
getReleases
called by 0
src/stylua.ts
chooseRelease
called by 0
src/stylua.ts
chooseAsset
called by 0
src/stylua.ts

Shape

Function 7
Interface 2

Languages

TypeScript100%

Modules by API surface

src/stylua.ts7 symbols
src/stylua.test.ts1 symbols
src/main.ts1 symbols

For agents

$ claude mcp add stylua-action \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact