Skip to content

Commit

Permalink
Add thrift file checker
Browse files Browse the repository at this point in the history
  • Loading branch information
maralla committed May 21, 2020
1 parent 014497d commit 4fe2aea
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pythonx/lints/thrift.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-

from __future__ import absolute_import

from validator import Validator


class Thrift(Validator):
__filetype__ = 'thrift'

instant = False
checker = 'thrift'

regex = r"""
\[((?P<warning>WARNING)|(?P<error>ERROR)):.*?:(?P<lnum>\d+)\]\s(?P<text>.*)
"""

def cmd(self, fname):
return 'bash -c "thrift -o $(mktemp -d) --gen py {}"'.format(fname)

0 comments on commit 4fe2aea

Please sign in to comment.