mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Add naive and untested version of Lua language support.
This commit is contained in:
parent
7a305e5d9a
commit
3f8be7400d
13 changed files with 286 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ import sys
|
|||
|
||||
LANGUAGES = [
|
||||
'conda', 'coursier', 'dart', 'docker', 'docker_image', 'dotnet', 'fail',
|
||||
'golang', 'node', 'perl', 'pygrep', 'python', 'r', 'ruby', 'rust',
|
||||
'golang', 'lua', 'node', 'perl', 'pygrep', 'python', 'r', 'ruby', 'rust',
|
||||
'script', 'swift', 'system',
|
||||
]
|
||||
FIELDS = [
|
||||
|
|
|
|||
5
testing/get-lua.sh
Executable file
5
testing/get-lua.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Install the runtime and package manager.
|
||||
sudo apt install lua5.3 liblua5.3-dev luarocks
|
||||
4
testing/resources/lua_repo/.pre-commit-hooks.yaml
Normal file
4
testing/resources/lua_repo/.pre-commit-hooks.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
- id: hello-world-lua
|
||||
name: hello world lua
|
||||
entry: hello-world-lua
|
||||
language: lua
|
||||
3
testing/resources/lua_repo/bin/hello-world-lua
Executable file
3
testing/resources/lua_repo/bin/hello-world-lua
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env lua
|
||||
|
||||
print('hello world')
|
||||
15
testing/resources/lua_repo/hello-dev-1.rockspec
Normal file
15
testing/resources/lua_repo/hello-dev-1.rockspec
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package = "hello"
|
||||
version = "dev-1"
|
||||
|
||||
source = {
|
||||
url = "git+ssh://git@github.com/pre-commit/pre-commit.git"
|
||||
}
|
||||
description = {}
|
||||
dependencies = {}
|
||||
build = {
|
||||
type = "builtin",
|
||||
modules = {},
|
||||
install = {
|
||||
bin = {"bin/hello-world-lua"}
|
||||
},
|
||||
}
|
||||
|
|
@ -48,6 +48,10 @@ skipif_cant_run_docker = pytest.mark.skipif(
|
|||
os.name == 'nt' or not docker_is_running(),
|
||||
reason="Docker isn't running or can't be accessed",
|
||||
)
|
||||
skipif_cant_run_lua = pytest.mark.skipif(
|
||||
os.name == 'nt',
|
||||
reason="lua isn't installed or can't be found",
|
||||
)
|
||||
skipif_cant_run_swift = pytest.mark.skipif(
|
||||
parse_shebang.find_executable('swift') is None,
|
||||
reason="swift isn't installed or can't be found",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue