Permalink
Browse files

add Lua linter

  • Loading branch information...
lunixbochs committed Jun 3, 2012
1 parent 45cea2f commit 1986c3b74dbad933b2ab1992344f4bcd4af347a0
Showing with 8 additions and 0 deletions.
  1. +8 −0 languages/extras.py
View
@@ -21,6 +21,14 @@ class JavaScript(Linter):
cmd = ('jsl', '-stdin')
regex = r'^\((?P<line>\d+)\):\s+(?P<error>.+)'
+class Lua(Linter):
+ language = 'lua'
+ cmd = ('luac', '-p')
+ regex = '^luac: [^:]+:(?P<line>\d+): (?P<error>.+?)(?P<near> near .+)?'
+
+ def communicate(self, cmd, code):
+ return self.tmpfile(cmd, code, suffix='.lua')
+
class Nasm(Linter):
language = 'x86 assembly'
cmd = ('nasm', '-X', 'gnu', '-I.', '-o', os.devnull)

0 comments on commit 1986c3b

Please sign in to comment.