mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-16 00:28:25 +01:00
Fixed formatting bug in the JSON output of the metrics module.
Sections in the metrics output were not being separated with a comma, leading to invalid JSON.
This commit is contained in:
parent
802f18e7e5
commit
7f5b50cd0d
1 changed files with 4 additions and 2 deletions
|
@ -107,7 +107,8 @@ class MetricsOutput(Outputable):
|
|||
eloc_xml += "\t\t\t\t\"value\": " + str(i[0]) + "\n"
|
||||
eloc_xml += "\t\t\t},"
|
||||
else:
|
||||
eloc_xml = eloc_xml[:-1]
|
||||
if not self.metrics.cyclomatic_complexity:
|
||||
eloc_xml = eloc_xml[:-1]
|
||||
|
||||
if self.metrics.cyclomatic_complexity:
|
||||
for i in sorted(set([(j, i) for (i, j) in self.metrics.cyclomatic_complexity.items()]), reverse=True):
|
||||
|
@ -116,7 +117,8 @@ class MetricsOutput(Outputable):
|
|||
eloc_xml += "\t\t\t\t\"value\": " + str(i[0]) + "\n"
|
||||
eloc_xml += "\t\t\t},"
|
||||
else:
|
||||
eloc_xml = eloc_xml[:-1]
|
||||
if not self.metrics.cyclomatic_complexity_density:
|
||||
eloc_xml = eloc_xml[:-1]
|
||||
|
||||
if self.metrics.cyclomatic_complexity_density:
|
||||
for i in sorted(set([(j, i) for (i, j) in self.metrics.cyclomatic_complexity_density.items()]), reverse=True):
|
||||
|
|
Loading…
Reference in a new issue