Skip to content

Commit 2610ef3

Browse files
authored
Merge pull request #206 from Freed-Wu/pre-commit
add pre-commit hooks
2 parents e699729 + 2482060 commit 2610ef3

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

.pre-commit-hooks.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
- id: emmyluacodestyle-check
3+
language: lua
4+
name: EmmyLuaCodeStyle check
5+
description: >
6+
use EmmyLuaCodeStyle to check lua files
7+
entry: CodeFormat
8+
types:
9+
- lua
10+
args:
11+
- check
12+
- -DAE
13+
- -f
14+
15+
- id: emmyluacodestyle-format
16+
language: lua
17+
name: EmmyLuaCodeStyle format
18+
description: >
19+
use EmmyLuaCodeStyle to format lua files
20+
entry: CodeFormat
21+
types:
22+
- lua
23+
args:
24+
- format
25+
- -ow
26+
- -f

emmyluacodestyle-scm-1.rockspec

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
local git_ref = '1.5.7'
2+
local modrev = 'scm'
3+
local specrev = '1'
4+
5+
rockspec_format = '3.0'
6+
package = 'EmmyLuaCodeStyle'
7+
version = modrev .. '-' .. specrev
8+
9+
local repo_url = 'https://github.com/CppCXY/EmmyLuaCodeStyle'
10+
11+
description = {
12+
summary = 'fast, powerful, and feature-rich Lua formatting and checking tool.',
13+
detailed =
14+
[[Lua code parsing, formatting, and code diagnosis algorithm library and language service implementation based on C++]],
15+
labels = { 'lua' },
16+
homepage = repo_url,
17+
license = 'MIT'
18+
}
19+
20+
source = {
21+
url = repo_url .. '/archive/' .. git_ref .. '.zip',
22+
dir = package .. '-' .. git_ref,
23+
}
24+
25+
build = {
26+
type = 'cmake',
27+
variables = {
28+
CMAKE_INSTALL_PREFIX = 'build',
29+
},
30+
install = {
31+
bin = {
32+
CodeFormat = 'build/bin/CodeFormat',
33+
CodeFormatServer = 'build/bin/CodeFormatServer',
34+
},
35+
}
36+
}

0 commit comments

Comments
 (0)