svn commit: r247235 - user/crees/rclint
Chris Rees
crees at FreeBSD.org
Sun Feb 24 19:49:03 UTC 2013
Author: crees (ports committer)
Date: Sun Feb 24 19:49:02 2013
New Revision: 247235
URL: http://svnweb.freebsd.org/changeset/base/247235
Log:
Actually check shebang
Modified:
user/crees/rclint/rclint.py
Modified: user/crees/rclint/rclint.py
==============================================================================
--- user/crees/rclint/rclint.py Sun Feb 24 19:32:43 2013 (r247234)
+++ user/crees/rclint/rclint.py Sun Feb 24 19:49:02 2013 (r247235)
@@ -193,7 +193,7 @@ class Comment:
class Shebang:
def __init__(self, comment):
self.line = comment.line
- result = comment.match(r'#!(\S+)\s*(.*)')
+ result = comment.match(r'^#!(\S+)\s*(.*)')
if result:
self.value = result[0]
self.args = result[1]
@@ -323,7 +323,7 @@ def do_rclint(filename):
logging.debug('OK, done collecting variables. Time to check!')
logging.debug('Checking shebang')
- if len(lineobj['Shebang']) < 1:
+ if lineobj['Shebang'][0].value == False:
error.give('shebang')
logging.debug('Checking RcsId')
More information about the svn-src-user
mailing list