forked from tushartushar/Puppeteer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPuppetLintRules.py
29 lines (25 loc) · 939 Bytes
/
PuppetLintRules.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import os
import sys
import PLConstants as CONSTS
import Aggregator
import Analyzer
root = sys.argv[1]
print("Initiating Custom Puppet-Lint Analyzer...")
totalRepos = len(os.listdir(root))
currentItem = 0
for item in os.listdir(root):
currentFolder = os.path.join(root, item)
if not os.path.isfile(currentFolder):
Analyzer.analyze(currentFolder, item)
currentItem += 1
#print (str("{:.2f}".format(float(currentItem * 100)/float(totalRepos))) + "% analysis done.")
print("Custom Puppet-Lint Analyzer - Done.")
#print("Initiating Puppet-Lint aggregator...")
#aggregatedFile = open(root + "/" + CONSTS.AGGREGATOR_FILE, 'wt')
#aggregatedFile.write(CONSTS.HEADER)
#for item in os.listdir(root):
# currentFolder = os.path.join(root, item)
# if not os.path.isfile(currentFolder):
# Aggregator.aggregate(currentFolder, item, aggregatedFile)
#aggregatedFile.close()
#print("Puppet-Lint aggregator - Done.")