feat: add lua universe package and stylua command to fmt check
Signed-off-by: teddylear <teddylear@protonmail.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
local function hello(offset)
|
||||
local foo = {}
|
||||
for i = 1, 10 do
|
||||
table.insert(foo, i + offset)
|
||||
end
|
||||
return another_thing
|
||||
end
|
@@ -0,0 +1,19 @@
|
||||
package lua
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"universe.dagger.io/x/teddylear@protonmail.com/lua"
|
||||
)
|
||||
|
||||
dagger.#Plan & {
|
||||
client: filesystem: "./data/hello": read: contents: dagger.#FS
|
||||
|
||||
actions: test: {
|
||||
simple: {
|
||||
fmtCheck: lua.#StyluaCheck & {
|
||||
source: client.filesystem."./data/hello".read.contents
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,9 @@
|
||||
setup() {
|
||||
load '../../../../bats_helpers'
|
||||
|
||||
common_setup
|
||||
}
|
||||
|
||||
@test "lua" {
|
||||
dagger "do" -p ./fmtCheck.cue test
|
||||
}
|
Reference in New Issue
Block a user