Skip to content

Commit

Permalink
resolve openmetrics tests
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Jan 24, 2023
1 parent a5d95f3 commit e4d1ace
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
1 change: 0 additions & 1 deletion LANGUAGES.md
Expand Up @@ -75,7 +75,6 @@ Expect (exp)
Extensible Stylesheet Language Transformations (xslt,xsl)
F# (fs,fsi,fsx,fsscript)
F* (fst)
Factor (factor)
Fennel (fnl)
FIDL (fidl)
Fish (fish)
Expand Down
28 changes: 14 additions & 14 deletions SCC-OUTPUT-REPORT.html
Expand Up @@ -12,12 +12,12 @@
<tbody><tr>
<th>Go</th>
<th>36</th>
<th>9188</th>
<th>9173</th>
<th>1459</th>
<th>443</th>
<th>7286</th>
<th>7271</th>
<th>1506</th>
<th>372213</th>
<th>371848</th>
</tr><tr>
<th>Java</th>
<th>24</th>
Expand All @@ -39,12 +39,12 @@
</tr><tr>
<th>Markdown</th>
<th>11</th>
<th>1430</th>
<th>1427</th>
<th>340</th>
<th>0</th>
<th>1090</th>
<th>1087</th>
<th>0</th>
<th>57882</th>
<th>57802</th>
</tr><tr>
<th>Python</th>
<th>10</th>
Expand Down Expand Up @@ -435,12 +435,12 @@
</tr><tr>
<th>JSON</th>
<th>1</th>
<th>8057</th>
<th>0</th>
<th>8330</th>
<th>8</th>
<th>0</th>
<th>8057</th>
<th>8322</th>
<th>0</th>
<th>112889</th>
<th>116692</th>
</tr><tr>
<th>Korn Shell</th>
<th>1</th>
Expand Down Expand Up @@ -679,11 +679,11 @@
<tfoot><tr>
<th>Total</th>
<th>187</th>
<th>30108</th>
<th>3378</th>
<th>30363</th>
<th>3386</th>
<th>1933</th>
<th>24797</th>
<th>25044</th>
<th>2662</th>
<th>1913776</th>
<th>1917134</th>
</tr></tfoot>
</table></body></html>
7 changes: 1 addition & 6 deletions processor/formatters_test.go
Expand Up @@ -740,7 +740,6 @@ func TestToOpenMetricsMultiple(t *testing.T) {
var expectedResult = `# TYPE scc_files count
# HELP scc_files Number of sourcecode files.
# TYPE scc_lines count
# UNIT scc_lines lines
# HELP scc_lines Number of lines.
# TYPE scc_code count
# HELP scc_code Number of lines of actual code.
Expand All @@ -760,7 +759,6 @@ scc_comments{language="Go"} 2000
scc_blanks{language="Go"} 2000
scc_complexity{language="Go"} 2000
scc_bytes{language="Go"} 2000
# EOF
`

if res != expectedResult {
Expand Down Expand Up @@ -974,7 +972,6 @@ func TestFileSummarizeOpenMetrics(t *testing.T) {
var expectedResult = `# TYPE scc_files count
# HELP scc_files Number of sourcecode files.
# TYPE scc_lines count
# UNIT scc_lines lines
# HELP scc_lines Number of lines.
# TYPE scc_code count
# HELP scc_code Number of lines of actual code.
Expand All @@ -994,7 +991,6 @@ scc_comments{language="Go"} 1000
scc_blanks{language="Go"} 1000
scc_complexity{language="Go"} 1000
scc_bytes{language="Go"} 1000
# EOF
`

if res != expectedResult {
Expand Down Expand Up @@ -1028,7 +1024,6 @@ func TestFileSummarizeOpenMetricsPerFile(t *testing.T) {
var expectedResult = `# TYPE scc_files count
# HELP scc_files Number of sourcecode files.
# TYPE scc_lines count
# UNIT scc_lines lines
# HELP scc_lines Number of lines.
# TYPE scc_code count
# HELP scc_code Number of lines of actual code.
Expand All @@ -1047,7 +1042,7 @@ scc_comments{language="Go",file="C:\\bbbb.go"} 1000
scc_blanks{language="Go",file="C:\\bbbb.go"} 1000
scc_complexity{language="Go",file="C:\\bbbb.go"} 1000
scc_bytes{language="Go",file="C:\\bbbb.go"} 1000
`
# EOF`

if res != expectedResult {
t.Error("Expected OpenMetrics return", res)
Expand Down

0 comments on commit e4d1ace

Please sign in to comment.