diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..b955d14 --- /dev/null +++ b/.github/workflows/main.yml @@ -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 \ No newline at end of file diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..07485c1 --- /dev/null +++ b/.luacheckrc @@ -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" + } + }, +} \ No newline at end of file