CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/Utilities/ReleaseScripts/python/commentSkipper/commentSkipper.py

Go to the documentation of this file.
00001 __author__="Aurelija"
00002 __date__ ="$2010-08-09 14.23.54$"
00003 
00004 import os.path
00005 import buildFileCommentSkipper
00006 import cppCommentSkipper
00007 
00008 cppCommentFiles = ['.h', '.c', '.cc', '.cxx']
00009 buildfilesCommentFiles = ['buildfile', 'buildfile.xml']
00010 
00011 def filter(fileList):
00012 
00013     if not fileList: return fileList
00014     head, tail = os.path.split(fileList[0])
00015     root, ext = os.path.splitext(tail)
00016     
00017     if (tail.lower() in buildfilesCommentFiles):
00018         fileList = buildFileCommentSkipper.filterFiles(fileList)
00019     elif (ext.lower() in cppCommentFiles):
00020         fileList = cppCommentSkipper.filterFiles(fileList)
00021     return fileList