1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-01 10:07:56 +00:00

Add a pre commit hook to lint code

This uses pre-commit [1] to check patches are well formed and run
several linters on them. We currently do some boring things (check files
are syntactically valid) as well as some project-specific ones:
 - Run illuaminate on the Lua files
 - Run checkstyle on Java

[1]: https://pre-commit.com/
This commit is contained in:
Jonathan Coates
2021-04-28 21:24:27 +01:00
parent 74dae4ec17
commit eb2d617ed8
12 changed files with 90 additions and 77 deletions

View File

@@ -20,7 +20,7 @@ Prints each key when the user presses it, and if the key is being held.
```lua
while true do
local event, key, is_held = os.pullEvent("key")
local event, key, is_held = os.pullEvent("key")
print(("%s held=%s"):format(keys.getName(key), is_held))
end
```