svn commit: r246943 - user/crees/rclint

Chris Rees crees at FreeBSD.org
Mon Feb 18 16:19:26 UTC 2013


Author: crees (ports committer)
Date: Mon Feb 18 16:19:26 2013
New Revision: 246943
URL: http://svnweb.freebsd.org/changeset/base/246943

Log:
  Fix style fix (tmp.value != False should be tmp.value)
  
  Pointyhat to:	eadler
  
  Fix pointless quoting for real this time (used to detect the quotes at the
  beginning and end of the value)
  
  Noticed by:	bdrewery

Modified:
  user/crees/rclint/rclint.py

Modified: user/crees/rclint/rclint.py
==============================================================================
--- user/crees/rclint/rclint.py	Mon Feb 18 16:03:42 2013	(r246942)
+++ user/crees/rclint/rclint.py	Mon Feb 18 16:19:26 2013	(r246943)
@@ -28,7 +28,7 @@ __version__ = '$FreeBSD$'
 
 MAJOR = 0
 MINOR = 0
-MICRO = 4
+MICRO = 5
 
 DATADIR = '.'
 
@@ -112,7 +112,7 @@ class Statement:
     def pointless_quoted(self):
         if not self.quoted():
             return False
-        for char in self.value:
+        for char in self.value[1:-1]:
             if char in ' \t|&;<>()$`\\\"\'':
                 return False
         return True
@@ -298,7 +298,7 @@ def do_rclint(filename):
     for num in range(0, len(lines)):
         for obj in list(lineobj.keys()):
             tmp = eval(obj)(lines, num)
-            if not tmp.value:
+            if tmp.value:
                 lineobj[obj].append(tmp)
                 break
 


More information about the svn-src-user mailing list