Skip to content

Commit

Permalink
Feature: Issue177 (#459)
Browse files Browse the repository at this point in the history
* Inital calculation

* tweak percentage mode output

* Add in formatters for max mean line calculations

* tweaking display

* Add in max meanline properly

* maxline displayed properly in table now

* Add line length to wide mode

* Add in test to capture
  • Loading branch information
boyter authored May 16, 2024
1 parent a9752bb commit 584047e
Show file tree
Hide file tree
Showing 9 changed files with 167 additions and 74 deletions.
1 change: 1 addition & 0 deletions LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ Visual Basic (vb)
Visual Basic for Applications (cls)
Vue (vue)
Web Services Description Language (wsdl)
WebGPU Shading Language (wgsl)
Windows Resource-Definition Script (rc)
Wolfram (nb,wl)
Wren (wren)
Expand Down
92 changes: 46 additions & 46 deletions SCC-OUTPUT-REPORT.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,23 @@
<tbody><tr>
<th>Go</th>
<th>30</th>
<th>9395</th>
<th>1463</th>
<th>454</th>
<th>7478</th>
<th>1524</th>
<th>403651</th>
<th>3963</th>
<th>9478</th>
<th>1475</th>
<th>458</th>
<th>7545</th>
<th>1542</th>
<th>406094</th>
<th>4017</th>
</tr><tr>
<td>processor/formatters.go</td>
<td></td>
<td>1604</td>
<td>213</td>
<td>46</td>
<td>1345</td>
<td>300</td>
<td>48690</td>
<td>794</td>
</tr><tr>
<td>processor/workers_test.go</td>
<td></td>
Expand All @@ -30,16 +40,6 @@
<td>287</td>
<td>32301</td>
<td>525</td>
</tr><tr>
<td>processor/formatters.go</td>
<td></td>
<td>1539</td>
<td>203</td>
<td>43</td>
<td>1293</td>
<td>284</td>
<td>47181</td>
<td>750</td>
</tr><tr>
<td>processor/formatters_test.go</td>
<td></td>
Expand All @@ -53,23 +53,23 @@
</tr><tr>
<td>processor/workers.go</td>
<td></td>
<td>877</td>
<td>128</td>
<td>883</td>
<td>129</td>
<td>91</td>
<td>658</td>
<td>228</td>
<td>25553</td>
<td>494</td>
<td>663</td>
<td>230</td>
<td>25701</td>
<td>496</td>
</tr><tr>
<td>processor/processor.go</td>
<td></td>
<td>655</td>
<td>138</td>
<td>101</td>
<td>416</td>
<td>658</td>
<td>139</td>
<td>102</td>
<td>417</td>
<td>91</td>
<td>18958</td>
<td>427</td>
<td>19040</td>
<td>429</td>
</tr><tr>
<td>processor/detector_test.go</td>
<td></td>
Expand All @@ -83,13 +83,13 @@
</tr><tr>
<td>main.go</td>
<td></td>
<td>385</td>
<td>392</td>
<td>10</td>
<td>6</td>
<td>369</td>
<td>376</td>
<td>10</td>
<td>8594</td>
<td>246</td>
<td>8715</td>
<td>250</td>
</tr><tr>
<td>cmd/badges/main.go</td>
<td></td>
Expand Down Expand Up @@ -133,13 +133,13 @@
</tr><tr>
<td>processor/structs.go</td>
<td></td>
<td>191</td>
<td>193</td>
<td>21</td>
<td>18</td>
<td>152</td>
<td>154</td>
<td>14</td>
<td>5583</td>
<td>130</td>
<td>5646</td>
<td>132</td>
</tr><tr>
<td>processor/workers_regression_test.go</td>
<td></td>
Expand Down Expand Up @@ -318,21 +318,21 @@
<td>0</td>
<td>4</td>
<td>0</td>
<td>175085</td>
<td>175605</td>
<td>5</td>
</tr></tbody>
<tfoot><tr>
<th>Total</th>
<th>30</th>
<th>9395</th>
<th>1463</th>
<th>454</th>
<th>7478</th>
<th>1524</th>
<th>403651</th>
<th>3963</th>
<th>9478</th>
<th>1475</th>
<th>458</th>
<th>7545</th>
<th>1542</th>
<th>406094</th>
<th>4017</th>
</tr>
<tr>
<th colspan="9">Estimated Cost to Develop (organic) $223,393<br>Estimated Schedule Effort (organic) 7.78 months<br>Estimated People Required (organic) 2.55<br></th>
<th colspan="9">Estimated Cost to Develop (organic) $225,495<br>Estimated Schedule Effort (organic) 7.81 months<br>Estimated People Required (organic) 2.57<br></th>
</tr></tfoot>
</table></body></html>
9 changes: 8 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ func main() {

flags := rootCmd.PersistentFlags()

flags.BoolVarP(
&processor.MaxMean,
"character",
"m",
false,
"calculate max and mean characters per line",
)
flags.BoolVarP(
&processor.Percent,
"percent",
Expand Down Expand Up @@ -279,7 +286,7 @@ func main() {
flags.StringArrayVarP(
&processor.Exclude,
"not-match",
"M",
`M`,
[]string{},
"ignore files and directories matching regular expression",
)
Expand Down
2 changes: 1 addition & 1 deletion processor/constants.go

Large diffs are not rendered by default.

Loading

0 comments on commit 584047e

Please sign in to comment.