Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:32:00

0001 from __future__ import absolute_import
0002 __author__="Aurelija"
0003 __date__ ="$2010-08-09 14.23.54$"
0004 
0005 import os.path
0006 from . import buildFileCommentSkipper
0007 from . import cppCommentSkipper
0008 
0009 cppCommentFiles = ['.h', '.c', '.cc', '.cxx']
0010 buildfilesCommentFiles = ['buildfile', 'buildfile.xml']
0011 
0012 def filter(fileList):
0013 
0014     if not fileList: return fileList
0015     head, tail = os.path.split(fileList[0])
0016     root, ext = os.path.splitext(tail)
0017     
0018     if (tail.lower() in buildfilesCommentFiles):
0019         fileList = buildFileCommentSkipper.filterFiles(fileList)
0020     elif (ext.lower() in cppCommentFiles):
0021         fileList = cppCommentSkipper.filterFiles(fileList)
0022     return fileList