mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 04:50:36 +00:00
Add luau-lsp analyze job to CI workflow
This commit is contained in:
parent
de0a570a40
commit
3b9830336e
3 changed files with 27 additions and 10 deletions
18
.github/workflows/ci.yaml
vendored
18
.github/workflows/ci.yaml
vendored
|
@ -17,8 +17,6 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
@ -34,6 +32,22 @@ jobs:
|
|||
- name: Check Formatting
|
||||
run: just fmt-check
|
||||
|
||||
analyze:
|
||||
name: Analyze and lint Luau files
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Just
|
||||
uses: extractions/setup-just@v1
|
||||
|
||||
- name: Install Tooling
|
||||
uses: ok-nick/setup-aftman@v0.4.2
|
||||
|
||||
- name: Analyze
|
||||
run: just analyze
|
||||
|
||||
ci:
|
||||
needs: ["fmt"]
|
||||
strategy:
|
||||
|
|
13
.justfile
13
.justfile
|
@ -45,7 +45,7 @@ test-bin *ARGS:
|
|||
fmt:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
stylua scripts tests types \
|
||||
stylua .lune scripts tests types \
|
||||
--glob "tests/**/*.luau" \
|
||||
--glob "!tests/roblox/rbx-test-files/**"
|
||||
cargo fmt
|
||||
|
@ -55,11 +55,20 @@ fmt:
|
|||
fmt-check:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
stylua scripts tests types \
|
||||
stylua .lune scripts tests types \
|
||||
--glob "tests/**/*.luau" \
|
||||
--glob "!tests/roblox/rbx-test-files/**"
|
||||
cargo fmt --check
|
||||
|
||||
# Analyze and lint Luau files using luau-lsp
|
||||
[no-exit-message]
|
||||
analyze:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
luau-lsp analyze .lune scripts tests types \
|
||||
--settings=".vscode/settings.json" \
|
||||
--ignore="tests/roblox/rbx-test-files/**"
|
||||
|
||||
# Zips up the built binary into a single zip file
|
||||
[no-exit-message]
|
||||
zip-release TARGET_TRIPLE:
|
||||
|
|
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
|
@ -1,21 +1,15 @@
|
|||
{
|
||||
// Luau - disable Roblox features, enable Lune typedefs & requires
|
||||
"luau-lsp.sourcemap.enabled": false,
|
||||
"luau-lsp.types.roblox": false,
|
||||
"luau-lsp.require.mode": "relativeToFile",
|
||||
"luau-lsp.require.directoryAliases": {
|
||||
"@lune/": "./types/"
|
||||
},
|
||||
// Luau - ignore type defs file in docs dir and dev scripts we use
|
||||
"luau-lsp.ignoreGlobs": [
|
||||
"docs/*.d.luau",
|
||||
"packages/lib-roblox/scripts/*.luau",
|
||||
"tests/roblox/rbx-test-files/**/*.lua",
|
||||
"tests/roblox/rbx-test-files/**/*.luau"
|
||||
],
|
||||
// Rust
|
||||
"rust-analyzer.check.command": "clippy",
|
||||
// Formatting
|
||||
"editor.formatOnSave": true,
|
||||
"stylua.searchParentDirectories": true,
|
||||
"prettier.tabWidth": 2,
|
||||
|
|
Loading…
Reference in a new issue