Skip to content

Commit

Permalink
fix: complexity score calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
GODrums committed Sep 18, 2024
1 parent a83d75c commit e82261c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ public List<LeaderboardEntry> createLeaderboard() {
* @return score
*/
private int calculateScore(PullRequest pullRequest) {
Double complexityScore = (pullRequest.getChangedFiles() * 3) + (pullRequest.getCommits() * 0.5)
+ pullRequest.getAdditions() + pullRequest.getDeletions();
Double complexityScore = ((pullRequest.getChangedFiles() * 3) + (pullRequest.getCommits() * 0.5)
+ pullRequest.getAdditions() + pullRequest.getDeletions()) / 10;
if (complexityScore < 10) {
return 1; // Simple
} else if (complexityScore < 50) {
Expand Down

0 comments on commit e82261c

Please sign in to comment.