Exemple #1
0
import reports

# Print the usage text if needed
if len(sys.argv) != 2:
	print "Usage: python wikifiy-summary.py Summary.plist"
	sys.exit()

# Read in the file they named
infile = open(sys.argv[1], "r")
data = infile.read()
infile.close()

# We want an array of reports, but we also want direct access to the plist
plist = plistlib.readPlistFromString(data)
reportlist = reports.summaryPlistToReports(data)

# Print out the header
print """== Static Analysis of Adium ==

This page lists the reports generated by [http://clang.llvm.org/StaticAnalysis.html Clang Static Analyzer] as run on r%(revision)s. This page can be used by developers to investigate each report and make a ruling on its validity.

=== Key ===

|| ||No ruling||
||[ticket:6 Y]||Confirmed report, ticket open||
||[ticket:1337 Y]||Confirmed report, ticket closed||
||~~[changeset:4 F]~~||Confirmed report, fixed without a ticket||
||N||False positive||

=== Reports ===
Exemple #2
0
	if dictA["Timestamp"] < dictB["Timestamp"]:
		leftDict = dictA
		rightDict = dictB
	else:
		rightDict = dictA
		leftDict = dictB
else:
	if int(dictA["Revision"]) < int(dictB["Revision"]):
		leftDict = dictA
		rightDict = dictB
	else:
		rightDict = dictA
		leftDict = dictB

# This is inefficient, but who cares. Get reports for each
leftReports  = reports.summaryPlistToReports(plistlib.writePlistToString(leftDict))
rightReports = reports.summaryPlistToReports(plistlib.writePlistToString(rightDict))

# Try to pair up reports
recurringBugs = 0
newBugs = 0

for r in rightReports:
	found = False
	
	for l in leftReports:
		if l == r:
			found = True
			break
	
	if found:
Exemple #3
0
    if dictA["Timestamp"] < dictB["Timestamp"]:
        leftDict = dictA
        rightDict = dictB
    else:
        rightDict = dictA
        leftDict = dictB
else:
    if int(dictA["Revision"]) < int(dictB["Revision"]):
        leftDict = dictA
        rightDict = dictB
    else:
        rightDict = dictA
        leftDict = dictB

# This is inefficient, but who cares. Get reports for each
leftReports = reports.summaryPlistToReports(
    plistlib.writePlistToString(leftDict))
rightReports = reports.summaryPlistToReports(
    plistlib.writePlistToString(rightDict))

# Try to pair up reports
recurringBugs = 0
newBugs = 0

for r in rightReports:
    found = False

    for l in leftReports:
        if l == r:
            found = True
            break
Exemple #4
0
import reports

# Print the usage text if needed
if len(sys.argv) != 2:
    print "Usage: python wikifiy-summary.py Summary.plist"
    sys.exit()

# Read in the file they named
infile = open(sys.argv[1], "r")
data = infile.read()
infile.close()

# We want an array of reports, but we also want direct access to the plist
plist = plistlib.readPlistFromString(data)
reportlist = reports.summaryPlistToReports(data)

# Print out the header
print """== Static Analysis of Adium ==

This page lists the reports generated by [http://clang.llvm.org/StaticAnalysis.html Clang Static Analyzer] as run on r%(revision)s. This page can be used by developers to investigate each report and make a ruling on its validity.

=== Key ===

|| ||No ruling||
||[ticket:6 Y]||Confirmed report, ticket open||
||[ticket:1337 Y]||Confirmed report, ticket closed||
||~~[changeset:4 F]~~||Confirmed report, fixed without a ticket||
||N||False positive||

=== Reports ===