Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.031 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'syntax': 0.04; "'#'": 0.09; 'lines.': 0.09; 'spaces': 0.09; 'python': 0.11; 'template': 0.14; 'brace': 0.16; 'created.': 0.16; 'indent': 0.16; 'subject:python': 0.16; 'module': 0.19; 'rules': 0.22; 'header :User-Agent:1': 0.23; 'replace': 0.24; 'cheers,': 0.24; 'cool': 0.30; 'comments': 0.31; 'allows': 0.31; 'open': 0.33; 'could': 0.34; 'but': 0.35; 'building': 0.35; 'there': 0.35; 'received:76': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'list,': 0.38; 'little': 0.38; 'does': 0.39; 'guidance': 0.39; 'to:addr:python.org': 0.39; 'remove': 0.60; 'blank': 0.60; 'simple': 0.61; 'taking': 0.65; 'series': 0.66; 'close': 0.67; 'complexity': 0.84; 'road.': 0.84 X-Virus-Scanned: Debian amavisd-new at enabled.com Date: Fri, 25 Jul 2014 20:33:58 -0700 From: Noah User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: python-list@python.org Subject: python template lint Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sat, 26 Jul 2014 08:34:10 +0200 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1406356451 news.xs4all.nl 2962 [2001:888:2000:d::a6]:48709 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75233 Hi there List, I am looking for a little guidance here. I am taking a series of template files for building configuration. I want to design some simple lint rules to check for some of the syntax of the template files I created. For instance if an open brace is seen indent 4 spaces each time. unindent when a close brace is seen. remove blank lines. Remove comments after '#' and so on. I could write this with search adn replace rules but I might want a module that allows for some complexity down the road. Any cool python module recommendations out there that does this well? Cheers, Noah