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 from __future__ import absolute_import
2 __author__="Aurelija"
3 __date__ ="$2010-08-09 14.23.54$"
4 
5 import os.path
6 from . import buildFileCommentSkipper
7 from . import cppCommentSkipper
8 
9 cppCommentFiles = ['.h', '.c', '.cc', '.cxx']
10 buildfilesCommentFiles = ['buildfile', 'buildfile.xml']
11 
12 def filter(fileList):
13 
14  if not fileList: return fileList
15  head, tail = os.path.split(fileList[0])
16  root, ext = os.path.splitext(tail)
17 
18  if (tail.lower() in buildfilesCommentFiles):
19  fileList = buildFileCommentSkipper.filterFiles(fileList)
20  elif (ext.lower() in cppCommentFiles):
21  fileList = cppCommentSkipper.filterFiles(fileList)
22  return fileList