For the file Sebastian_CollectFiles.py this file is currently hard to read and understand we can probably utilize more functions, add more documentation and include a main
dictfiles = dict()
countfiles(dictfiles, lstTokens, repo)
print('Total number of files: ' + str(len(dictfiles)))
file = repo.split('/')[1]
fileOutput = 'data/file_' + file + '.csv'
rows = ["Filename", "Touches"]
fileCSV = open(fileOutput, 'w')
writer = csv.writer(fileCSV)
writer.writerow(rows)
bigcount = None
bigfilename = None
for filename, count in dictfiles.items():
rows = [filename, count]
writer.writerow(rows)
if bigcount is None or count > bigcount:
bigcount = count
bigfilename = filename
fileCSV.close()
print('The file ' + bigfilename + ' has been touched ' + str(bigcount) + ' times.')```
For the file Sebastian_CollectFiles.py this file is currently hard to read and understand we can probably utilize more functions, add more documentation and include a main