Skip to content

Commit c76d14d

Browse files
committed
ktlint: Drop unused trailing commas
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
1 parent d6f3dee commit c76d14d

25 files changed

Lines changed: 58 additions & 60 deletions

File tree

.editorconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,3 @@ ktlint_standard_spacing-between-declarations-with-annotations = disabled
3838
ktlint_standard_spacing-between-declarations-with-comments = disabled
3939
ktlint_standard_statement-wrapping = disabled
4040
ktlint_standard_string-template-indent = disabled
41-
ktlint_standard_trailing-comma-on-call-site = disabled
42-
ktlint_standard_trailing-comma-on-declaration-site = disabled

app/src/androidTest/java/org/schabi/newpipe/database/FeedDAOTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class FeedDAOTest {
111111
SubscriptionEntity.from(ChannelInfo(serviceId, "1", "https://youtube.com/channel/1", "https://youtube.com/channel/1", "channel-1")),
112112
SubscriptionEntity.from(ChannelInfo(serviceId, "2", "https://youtube.com/channel/2", "https://youtube.com/channel/2", "channel-2")),
113113
SubscriptionEntity.from(ChannelInfo(serviceId, "3", "https://youtube.com/channel/3", "https://youtube.com/channel/3", "channel-3")),
114-
SubscriptionEntity.from(ChannelInfo(serviceId, "4", "https://youtube.com/channel/4", "https://youtube.com/channel/4", "channel-4")),
114+
SubscriptionEntity.from(ChannelInfo(serviceId, "4", "https://youtube.com/channel/4", "https://youtube.com/channel/4", "channel-4"))
115115
)
116116
)
117117
feedDAO.insertAll(
@@ -122,7 +122,7 @@ class FeedDAOTest {
122122
FeedEntity(4, 2),
123123
FeedEntity(5, 2),
124124
FeedEntity(6, 3),
125-
FeedEntity(7, 4),
125+
FeedEntity(7, 4)
126126
)
127127
)
128128
}

app/src/androidTest/java/org/schabi/newpipe/local/history/HistoryRecordManagerTest.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class HistoryRecordManagerTest {
5454
SearchHistoryEntry(creationDate = time.minusSeconds(1), serviceId = 0, search = "A"),
5555
SearchHistoryEntry(creationDate = time.minusSeconds(2), serviceId = 2, search = "A"),
5656
SearchHistoryEntry(creationDate = time.minusSeconds(3), serviceId = 1, search = "B"),
57-
SearchHistoryEntry(creationDate = time.minusSeconds(4), serviceId = 0, search = "B"),
57+
SearchHistoryEntry(creationDate = time.minusSeconds(4), serviceId = 0, search = "B")
5858
)
5959

6060
// make sure all 4 were inserted
@@ -85,7 +85,7 @@ class HistoryRecordManagerTest {
8585
val entries = listOf(
8686
SearchHistoryEntry(creationDate = time.minusSeconds(1), serviceId = 1, search = "A"),
8787
SearchHistoryEntry(creationDate = time.minusSeconds(2), serviceId = 2, search = "B"),
88-
SearchHistoryEntry(creationDate = time.minusSeconds(3), serviceId = 0, search = "C"),
88+
SearchHistoryEntry(creationDate = time.minusSeconds(3), serviceId = 0, search = "C")
8989
)
9090

9191
// make sure all 3 were inserted
@@ -121,7 +121,7 @@ class HistoryRecordManagerTest {
121121
RELATED_SEARCHES_ENTRIES[6].search, // A (even if in two places)
122122
RELATED_SEARCHES_ENTRIES[4].search, // B
123123
RELATED_SEARCHES_ENTRIES[5].search, // AA
124-
RELATED_SEARCHES_ENTRIES[2].search, // BA
124+
RELATED_SEARCHES_ENTRIES[2].search // BA
125125
)
126126
}
127127

@@ -136,7 +136,7 @@ class HistoryRecordManagerTest {
136136
SearchHistoryEntry(creationDate = time.minusSeconds(4), serviceId = 3, search = "A"),
137137
SearchHistoryEntry(creationDate = time.minusSeconds(3), serviceId = 3, search = "A"),
138138
SearchHistoryEntry(creationDate = time.minusSeconds(2), serviceId = 0, search = "A"),
139-
SearchHistoryEntry(creationDate = time.minusSeconds(1), serviceId = 2, search = "AA"),
139+
SearchHistoryEntry(creationDate = time.minusSeconds(1), serviceId = 2, search = "AA")
140140
)
141141
insertShuffledRelatedSearches(relatedSearches)
142142

@@ -153,7 +153,7 @@ class HistoryRecordManagerTest {
153153
assertThat(searches).containsExactly(
154154
RELATED_SEARCHES_ENTRIES[6].search, // A (even if in two places)
155155
RELATED_SEARCHES_ENTRIES[5].search, // AA
156-
RELATED_SEARCHES_ENTRIES[1].search, // BA
156+
RELATED_SEARCHES_ENTRIES[1].search // BA
157157
)
158158

159159
// also make sure that the string comparison is case insensitive
@@ -171,7 +171,7 @@ class HistoryRecordManagerTest {
171171
SearchHistoryEntry(creationDate = time.minusSeconds(4), serviceId = 3, search = "A"),
172172
SearchHistoryEntry(creationDate = time.minusSeconds(2), serviceId = 0, search = "B"),
173173
SearchHistoryEntry(creationDate = time.minusSeconds(3), serviceId = 2, search = "AA"),
174-
SearchHistoryEntry(creationDate = time.minusSeconds(1), serviceId = 1, search = "A"),
174+
SearchHistoryEntry(creationDate = time.minusSeconds(1), serviceId = 1, search = "A")
175175
)
176176
}
177177
}

app/src/androidTest/java/org/schabi/newpipe/util/StreamItemAdapterTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class StreamItemAdapterTest {
292292
Assert.assertEquals(
293293
"normal visibility (pos=[$position]) is not correct",
294294
findViewById<View>(R.id.wo_sound_icon).visibility,
295-
normalVisibility,
295+
normalVisibility
296296
)
297297
}
298298
spinner.adapter.getDropDownView(position, null, spinner).run {

app/src/main/java/org/schabi/newpipe/about/AboutActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class AboutActivity : AppCompatActivity() {
195195
SoftwareComponent(
196196
"SearchPreference", "2018", "ByteHamster",
197197
"https://github.com/ByteHamster/SearchPreference", StandardLicenses.MIT
198-
),
198+
)
199199
)
200200
}
201201
}

app/src/main/java/org/schabi/newpipe/database/LocalItem.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ interface LocalItem {
1414
PLAYLIST_REMOTE_ITEM,
1515

1616
PLAYLIST_STREAM_ITEM,
17-
STATISTIC_STREAM_ITEM,
17+
STATISTIC_STREAM_ITEM
1818
}
1919
}

app/src/main/java/org/schabi/newpipe/database/history/model/SearchHistoryEntry.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ data class SearchHistoryEntry @JvmOverloads constructor(
2929

3030
@ColumnInfo(name = ID)
3131
@PrimaryKey(autoGenerate = true)
32-
val id: Long = 0,
32+
val id: Long = 0
3333
) {
3434

3535
@Ignore

app/src/main/java/org/schabi/newpipe/database/history/model/StreamHistoryEntry.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ data class StreamHistoryEntry(
3535
streamEntity.serviceId,
3636
streamEntity.url,
3737
streamEntity.title,
38-
streamEntity.streamType,
38+
streamEntity.streamType
3939
).apply {
4040
duration = streamEntity.duration
4141
uploaderName = streamEntity.uploader

app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistEntity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ data class PlaylistEntity @JvmOverloads constructor(
3737
name = item.orderingName,
3838
isThumbnailPermanent = item.isThumbnailPermanent!!,
3939
thumbnailStreamId = item.thumbnailStreamId!!,
40-
displayIndex = item.displayIndex!!,
40+
displayIndex = item.displayIndex!!
4141
)
4242

4343
companion object {

app/src/main/java/org/schabi/newpipe/error/ErrorInfo.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ErrorInfo private constructor(
5959
* If present, this resource can alternatively be opened in browser (useful if NewPipe is
6060
* badly broken).
6161
*/
62-
val openInBrowserUrl: String?,
62+
val openInBrowserUrl: String?
6363
) : Parcelable {
6464

6565
@JvmOverloads
@@ -68,7 +68,7 @@ class ErrorInfo private constructor(
6868
userAction: UserAction,
6969
request: String,
7070
serviceId: Int? = null,
71-
openInBrowserUrl: String? = null,
71+
openInBrowserUrl: String? = null
7272
) : this(
7373
throwableToStringList(throwable),
7474
userAction,
@@ -78,7 +78,7 @@ class ErrorInfo private constructor(
7878
isReportable(throwable),
7979
isRetryable(throwable),
8080
(throwable as? ReCaptchaException)?.url,
81-
openInBrowserUrl,
81+
openInBrowserUrl
8282
)
8383

8484
@JvmOverloads
@@ -87,7 +87,7 @@ class ErrorInfo private constructor(
8787
userAction: UserAction,
8888
request: String,
8989
serviceId: Int? = null,
90-
openInBrowserUrl: String? = null,
90+
openInBrowserUrl: String? = null
9191
) : this(
9292
throwableListToStringList(throwables),
9393
userAction,
@@ -97,7 +97,7 @@ class ErrorInfo private constructor(
9797
throwables.any(::isReportable),
9898
throwables.isEmpty() || throwables.any(::isRetryable),
9999
throwables.firstNotNullOfOrNull { it as? ReCaptchaException }?.url,
100-
openInBrowserUrl,
100+
openInBrowserUrl
101101
)
102102

103103
// constructor to manually build ErrorInfo when no throwable is available
@@ -118,7 +118,7 @@ class ErrorInfo private constructor(
118118
throwable: Throwable,
119119
userAction: UserAction,
120120
request: String,
121-
info: Info?,
121+
info: Info?
122122
) :
123123
this(throwable, userAction, request, info?.serviceId, info?.url)
124124

@@ -127,7 +127,7 @@ class ErrorInfo private constructor(
127127
throwables: List<Throwable>,
128128
userAction: UserAction,
129129
request: String,
130-
info: Info?,
130+
info: Info?
131131
) :
132132
this(throwables, userAction, request, info?.serviceId, info?.url)
133133

@@ -144,7 +144,7 @@ class ErrorInfo private constructor(
144144
class ErrorMessage(
145145
@StringRes
146146
private val stringRes: Int,
147-
private vararg val formatArgs: String,
147+
private vararg val formatArgs: String
148148
) : Parcelable {
149149
fun getString(context: Context): String {
150150
return if (formatArgs.isEmpty()) {
@@ -174,7 +174,7 @@ class ErrorInfo private constructor(
174174
fun getMessage(
175175
throwable: Throwable?,
176176
action: UserAction?,
177-
serviceId: Int?,
177+
serviceId: Int?
178178
): ErrorMessage {
179179
return when {
180180
// player exceptions

0 commit comments

Comments
 (0)