4 theCopyright = '// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE'
6 def check_file( theFile ):
8 #print 'Checking %s...' % theFile
9 aLines = open( theFile, 'r' ).readlines()
10 if( len( aLines )==0 ):
11 print 'Empty file: ', theFile
14 aFirstLine = aLines[0][:-1]
15 if( aFirstLine != theCopyright ):
16 print 'Incorrect copyright in the', theFile
21 def check_folder( theFolder ):
22 aFiles = os.listdir( theFolder );
23 aHeaders = filter( lambda x: x.endswith('.h'), aFiles );
24 aSources = filter( lambda x: x.endswith('.cxx'), aFiles );
25 aSIPs = filter( lambda x: x.endswith('.sip'), aFiles );
26 for aHeader in aHeaders:
27 check_file( theFolder + '/' + aHeader )
28 for aSource in aSources:
29 check_file( theFolder + '/' + aSource )
31 check_file( theFolder + '/' + aSIP )
34 check_folder( 'src/HYDROData' )
35 check_folder( 'src/HYDROGUI' )
36 check_folder( 'src/HYDROPy' )