CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
commentSkipper.py
Go to the documentation of this file.
1 __author__="Aurelija"
2 __date__ ="$2010-08-09 14.23.54$"
3 
4 import os.path
5 import buildFileCommentSkipper
6 import cppCommentSkipper
7 
8 cppCommentFiles = ['.h', '.c', '.cc', '.cxx']
9 buildfilesCommentFiles = ['buildfile', 'buildfile.xml']
10 
11 def filter(fileList):
12 
13  if not fileList: return fileList
14  head, tail = os.path.split(fileList[0])
15  root, ext = os.path.splitext(tail)
16 
17  if (tail.lower() in buildfilesCommentFiles):
18  fileList = buildFileCommentSkipper.filterFiles(fileList)
19  elif (ext.lower() in cppCommentFiles):
20  fileList = cppCommentSkipper.filterFiles(fileList)
21  return fileList