Skip to content

Commit

Permalink
resolve #230
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Feb 23, 2021
1 parent 81f1bf0 commit c1db1da
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 15 deletions.
26 changes: 13 additions & 13 deletions SCC-OUTPUT-REPORT.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
<tbody><tr>
<th>Go</th>
<th>34</th>
<th>8511</th>
<th>1389</th>
<th>8548</th>
<th>1396</th>
<th>398</th>
<th>6724</th>
<th>1384</th>
<th>334654</th>
<th>6754</th>
<th>1392</th>
<th>335390</th>
</tr><tr>
<th>Java</th>
<th>24</th>
Expand Down Expand Up @@ -372,12 +372,12 @@
</tr><tr>
<th>JSON</th>
<th>1</th>
<th>7184</th>
<th>7189</th>
<th>0</th>
<th>0</th>
<th>7184</th>
<th>7189</th>
<th>0</th>
<th>100043</th>
<th>100107</th>
</tr><tr>
<th>Korn Shell</th>
<th>1</th>
Expand Down Expand Up @@ -571,11 +571,11 @@
<tfoot><tr>
<th>Total</th>
<th>168</th>
<th>25685</th>
<th>2936</th>
<th>25727</th>
<th>2943</th>
<th>1718</th>
<th>21031</th>
<th>2335</th>
<th>1775956</th>
<th>21066</th>
<th>2343</th>
<th>1776756</th>
</tr></tfoot>
</table></body></html>
7 changes: 6 additions & 1 deletion languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,12 @@
"-}"
]
],
"quotes": []
"quotes": [
{
"end": "\"",
"start": "\""
}
]
},
"Emacs Dev Env": {
"complexitychecks": [
Expand Down
2 changes: 1 addition & 1 deletion processor/constants.go

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions processor/workers_regression_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,40 @@ hello there! how's it going?
t.Errorf("Expected 0 lines got %d", fileJob.Blank)
}
}

func TestCountStatsIssue230(t *testing.T) {
ProcessConstants()
fileJob := FileJob{
Language: "Elm",
}

fileJob.SetContent(`module Main exposing (main)
import Html
main =
Html.node "style" [] [ Html.text "div[role=button] {-webkit-tap-highlight-color: transparent}" ]
a =
3`)

CountStats(&fileJob)

if fileJob.Lines != 11 {
t.Errorf("Expected 11 lines got %d", fileJob.Lines)
}

if fileJob.Code != 6 {
t.Errorf("Expected 6 lines got %d", fileJob.Code)
}

if fileJob.Comment != 0 {
t.Errorf("Expected 0 lines got %d", fileJob.Comment)
}

if fileJob.Blank != 5 {
t.Errorf("Expected 5 lines got %d", fileJob.Blank)
}
}

0 comments on commit c1db1da

Please sign in to comment.