Last active
February 22, 2025 22:34
-
-
Save dig1t/3b63eed7beba48cf690a4c3da2d5f391 to your computer and use it in GitHub Desktop.
Roblox Luau Linter - Runs on Pull Requests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tools] | |
luau-lsp = "JohnnyMorganz/[email protected]" | |
rojo = "rojo-rbx/[email protected]" | |
selene = "Kampfkarren/[email protected]" | |
wally = "UpliftGames/[email protected]" | |
wally-package-types = "JohnnyMorganz/[email protected]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linter | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize, ready_for_review] | |
jobs: | |
lint: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: ok-nick/[email protected] | |
- name: Install packages | |
run: wally install | |
- name: Download type files | |
run: curl -L "https://raw.githubusercontent.com/JohnnyMorganz/luau-lsp/main/scripts/globalTypes.d.luau" > globalTypes.d.luau | |
- name: Generate sourcemaps | |
run: rojo sourcemap --include-non-scripts --output sourcemap.json | |
- name: Generate package types | |
run: wally-package-types --sourcemap sourcemap.json Packages | |
- name: Lint with luau-lsp | |
run: luau-lsp analyze --defs=globalTypes.d.luau --sourcemap=sourcemap.json --no-strict-dm-types --ignore=Packages/** --ignore=*.spec.lua --ignore=*.spec.luau --flag:LuauTinyControlFlowAnalysis=True src | |
- name : Lint with selene | |
run: selene src |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment