Skip to content

Commit

Permalink
fix CodeStyleAnalyzer calculation
Browse files Browse the repository at this point in the history
I forgot to round to the nearest average number of spaces.
  • Loading branch information
Prince781 committed Jul 9, 2021
1 parent 3e01b83 commit 3b8759b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/analysis/codestyleanalyzer.vala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Vls.CodeStyleAnalyzer : CodeVisitor, CodeAnalyzer {
get {
if (_num_callable == 0)
return 1;
return _total_spacing / _num_callable;
return (_total_spacing + _num_callable / 2) / _num_callable;
}
}

Expand Down

0 comments on commit 3b8759b

Please sign in to comment.