apache / lucenenet

Apache Lucene.NET
https://lucenenet.apache.org/
Apache License 2.0
2.24k stars 639 forks source link

Add comments to empty blocks to address Sonar csharpsquid:S108, #672 #1032

Closed paulirwin closed 3 days ago

paulirwin commented 3 days ago

Add comments to empty blocks to address Sonar csharpsquid:S108

Fixes #672

Description

Sonar was finding empty blocks (while, using, for, catch, etc.) that did not have any statements in them nor comments, so this adds comments since in almost all cases it was intended to be ignored. In one case, the code was changed to better match upstream by manually calling Dispose instead of using a using block.