add editorconfig and luacheck with github workflows
This commit is contained in:
parent
59f07613b0
commit
cb3154cba8
10
.editorconfig
Normal file
10
.editorconfig
Normal file
@ -0,0 +1,10 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_size = 4
|
||||
indent_style = tab
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[{locale/template,locale/*.tr}]
|
||||
end_of_line = lf
|
20
.github/workflows/luacheck.yml
vendored
Normal file
20
.github/workflows/luacheck.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
name: Luacheck
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- name: Install Luarocks
|
||||
run: |
|
||||
sudo apt-get update -qyy
|
||||
sudo apt-get install luarocks -qyy
|
||||
|
||||
- name: Install Luacheck
|
||||
run: luarocks install --local luacheck
|
||||
|
||||
- name: Run Luacheck
|
||||
run: $HOME/.luarocks/bin/luacheck ./
|
27
.luacheckrc
Normal file
27
.luacheckrc
Normal file
@ -0,0 +1,27 @@
|
||||
unused_args = false
|
||||
|
||||
globals = {
|
||||
"basic_machines"
|
||||
}
|
||||
|
||||
read_globals = {
|
||||
"ItemStack",
|
||||
"default",
|
||||
"farming",
|
||||
"machines",
|
||||
"minetest",
|
||||
"player_monoids",
|
||||
"unified_inventory",
|
||||
"vector",
|
||||
table = {fields = {"copy"}}
|
||||
}
|
||||
|
||||
files["ball.lua"] = {globals = {"boneworld.killxp"}}
|
||||
files["grinder.lua"] = {read_globals = {"i3"}}
|
||||
files["keypad.lua"] = {read_globals = {"signs_lib"}}
|
||||
files["machines_configuration.lua"] = {max_line_length = 190}
|
||||
files["mark.lua"] = {globals = {"machines"}}
|
||||
files["mesecon_adapter.lua"] = {read_globals = {"mesecon"}}
|
||||
files["mover.lua"] = {max_line_length = 290, read_globals = {"bucket", "nodeupdate"}}
|
||||
files["protect.lua"] = {globals = {"minetest.is_protected"}}
|
||||
files["technic_power.lua"] = {max_line_length = 140}
|
Loading…
x
Reference in New Issue
Block a user