[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [61135] trunk/blender/source/tools/ check_style_c.py: fix style checker for single files
Campbell Barton
ideasman42 at gmail.com
Tue Nov 5 15:46:35 CET 2013
Revision: 61135
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=61135
Author: campbellbarton
Date: 2013-11-05 14:46:35 +0000 (Tue, 05 Nov 2013)
Log Message:
-----------
fix style checker for single files
Modified Paths:
--------------
trunk/blender/source/tools/check_style_c.py
Modified: trunk/blender/source/tools/check_style_c.py
===================================================================
--- trunk/blender/source/tools/check_style_c.py 2013-11-05 14:38:18 UTC (rev 61134)
+++ trunk/blender/source/tools/check_style_c.py 2013-11-05 14:46:35 UTC (rev 61135)
@@ -1012,6 +1012,20 @@
# #print(value, end="")
+def scan_source_filepath(filepath, args):
+ # for quick tests
+ #~ if not filepath.endswith("creator.c"):
+ #~ return
+
+ code = open(filepath, 'r', encoding="utf-8").read()
+
+ # fast checks which don't require full parsing
+ quick_check_source(filepath, code, args)
+
+ # use lexer
+ scan_source(filepath, code, args)
+
+
def scan_source_recursive(dirpath, args):
import os
from os.path import join, splitext
@@ -1035,19 +1049,10 @@
for filepath in sorted(source_list(dirpath, is_source)):
if is_ignore(filepath):
continue
- # for quick tests
- #~ if not filepath.endswith("creator.c"):
- #~ continue
- code = open(filepath, 'r', encoding="utf-8").read()
+ scan_source_filepath(filepath, args)
- # fast checks which don't require full parsing
- quick_check_source(filepath, code, args)
- # use lexer
- scan_source(filepath, code, args)
-
-
if __name__ == "__main__":
import sys
import os
@@ -1071,4 +1076,4 @@
scan_source_recursive(filepath, args)
else:
# single file
- scan_source(filepath, args)
+ scan_source_filepath(filepath, args)
More information about the Bf-blender-cvs
mailing list