diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml new file mode 100644 index 0000000..9ab81f7 --- /dev/null +++ b/.pre-commit-hooks.yaml @@ -0,0 +1,26 @@ +--- +- id: emmyluacodestyle-check + language: lua + name: EmmyLuaCodeStyle check + description: > + use EmmyLuaCodeStyle to check lua files + entry: CodeFormat + types: + - lua + args: + - check + - -DAE + - -f + +- id: emmyluacodestyle-format + language: lua + name: EmmyLuaCodeStyle format + description: > + use EmmyLuaCodeStyle to format lua files + entry: CodeFormat + types: + - lua + args: + - format + - -ow + - -f diff --git a/emmyluacodestyle-scm-1.rockspec b/emmyluacodestyle-scm-1.rockspec new file mode 100644 index 0000000..3773872 --- /dev/null +++ b/emmyluacodestyle-scm-1.rockspec @@ -0,0 +1,36 @@ +local git_ref = '1.5.7' +local modrev = 'scm' +local specrev = '1' + +rockspec_format = '3.0' +package = 'EmmyLuaCodeStyle' +version = modrev .. '-' .. specrev + +local repo_url = 'https://github.com/CppCXY/EmmyLuaCodeStyle' + +description = { + summary = 'fast, powerful, and feature-rich Lua formatting and checking tool.', + detailed = + [[Lua code parsing, formatting, and code diagnosis algorithm library and language service implementation based on C++]], + labels = { 'lua' }, + homepage = repo_url, + license = 'MIT' +} + +source = { + url = repo_url .. '/archive/' .. git_ref .. '.zip', + dir = package .. '-' .. git_ref, +} + +build = { + type = 'cmake', + variables = { + CMAKE_INSTALL_PREFIX = 'build', + }, + install = { + bin = { + CodeFormat = 'build/bin/CodeFormat', + CodeFormatServer = 'build/bin/CodeFormatServer', + }, + } +}