add luacheck workflow

This commit is contained in:
AFCMS 2021-07-19 23:25:29 +02:00
parent 5201b1b787
commit 2db9151099
2 changed files with 70 additions and 0 deletions

25
.github/workflows/main.yml vendored Normal file
View file

@ -0,0 +1,25 @@
name: luacheck
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
main:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v2
- name: luacheck
uses: nebularg/actions-luacheck@v1.1.0
#with:
#files: # optional, default is .
#path: # optional, default is ${{ github.workspace }}
#args: # optional
#config: # optional
#annotate: # optional, default is none

45
.luacheckrc Normal file
View file

@ -0,0 +1,45 @@
read_globals = {
"DIR_DELIM", "INIT",
"minetest", "core",
"dump", "dump2",
"Raycast",
"Settings",
"PseudoRandom",
"PerlinNoise",
"VoxelManip",
"SecureRandom",
"VoxelArea",
"PerlinNoiseMap",
"PcgRandom",
"ItemStack",
"AreaStore",
"vector",
table = {
fields = {
"copy",
"indexof",
"insert_all",
"key_value_swap",
"shuffle",
}
},
string = {
fields = {
"split",
"trim",
}
},
math = {
fields = {
"hypot",
"sign",
"factorial"
}
},
}