MCPcopy Create free account
hub / github.com/catchorg/Catch2 / fixAllFilesInDir

Function fixAllFilesInDir

tools/scripts/fixWhitespace.py:9–19  ·  view source on GitHub ↗
( dir )

Source from the content-addressed store, hash-verified

7 return path.endswith( ".cpp" ) or path.endswith( ".h" ) or path.endswith( ".hpp" )
8
9def fixAllFilesInDir( dir ):
10 changedFiles = 0
11 for f in os.listdir( dir ):
12 path = os.path.join( dir,f )
13 if os.path.isfile( path ):
14 if isSourceFile( path ):
15 if fixFile( path ):
16 changedFiles += 1
17 else:
18 fixAllFilesInDir( path )
19 return changedFiles
20
21def fixFile( path ):
22 f = open( path, 'r' )

Callers 1

fixWhitespace.pyFile · 0.85

Calls 2

isSourceFileFunction · 0.85
fixFileFunction · 0.85

Tested by

no test coverage detected