Skip to content

Commit af91d39

Browse files
author
Gonzalo Diaz
committed
[BUGFIX] sonarqube: Prefer class field declaration over this assignment in constructor for static values.
Class properties should be declared as fields rather than assigned in constructors typescript:S7757
1 parent 2848298 commit af91d39

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/hackerrank/interview_preparation_kit/sort/ctci_bubble_sort.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ const SEPARATOR = '\n';
77
class SortableGroup {
88
group: number[];
99

10-
count: number;
10+
count = 0;
1111

1212
constructor(group: number[]) {
13-
this.count = 0;
1413
this.group = group;
1514
}
1615

0 commit comments

Comments
 (0)