Skip to content

Commit

Permalink
Fix various build warnings (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
cortinico authored Jun 5, 2022
1 parent 6b23fba commit f42f0b8
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 15 deletions.
6 changes: 0 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,6 @@ allprojects {
repositories {
google()
mavenCentral()
jcenter {
content {
includeModule("org.jetbrains.trove4j", "trove4j")
includeModule("org.jetbrains.kotlinx", "kotlinx-html-jvm")
}
}
}

tasks.withType(Test) {
Expand Down
5 changes: 4 additions & 1 deletion detekt-config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
build:
maxIssues: 1
maxIssues: 0
weights:
# complexity: 2
# LongParameterList: 1
Expand All @@ -14,6 +14,9 @@ complexity:
ComplexCondition:
active: true
threshold: 5
LongMethod:
active: true
excludes: ['**/test/**', '**/androidTest/**']
LongParameterList:
active: true
ignoreDefaultParameters: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import android.content.Intent
/**
* No-op implementation.
*/
@Suppress("UnusedPrivateMember")
@Suppress("UnusedPrivateMember", "UNUSED_PARAMETER")
public object Chucker {

@Suppress("MayBeConst ") // https://github.com/ChuckerTeam/chucker/pull/169#discussion_r362341353
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import android.content.Context
/**
* No-op implementation.
*/
@Suppress("UnusedPrivateMember")
@Suppress("UnusedPrivateMember", "UNUSED_PARAMETER")
public class ChuckerCollector @JvmOverloads constructor(
context: Context,
public var showNotification: Boolean = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import java.io.IOException
/**
* No-op implementation.
*/
@Suppress("UnusedPrivateMember")
@Suppress("UnusedPrivateMember", "UNUSED_PARAMETER")
public class ChuckerInterceptor private constructor(
builder: Builder,
) : Interceptor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import android.content.Context
/**
* No-op implementation.
*/
@Suppress("UnusedPrivateMember")
@Suppress("UnusedPrivateMember", "UNUSED_PARAMETER")
public class RetentionManager @JvmOverloads constructor(
context: Context,
retentionPeriod: Any? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ internal class ContentTest {
fun `content is created correctly with size`() {
val content = HarTestUtils.createContent("GET")

assertThat(content?.size).isEqualTo(1000)
assertThat(content.size).isEqualTo(1000)
}

@Test
fun `content is created correctly with mime type`() {
val content = HarTestUtils.createContent("GET")

assertThat(content?.mimeType).isEqualTo("application/json")
assertThat(content.mimeType).isEqualTo("application/json")
}

@Test
fun `content is created correctly with fields and values`() {
val content = HarTestUtils.createContent("GET")

assertThat(content?.text).isEqualTo("""{"field": "value"}""")
assertThat(content.text).isEqualTo("""{"field": "value"}""")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal class EntryTest {
val transaction = HarTestUtils.createTransaction("GET")
val entry = HarTestUtils.createEntry("GET")

assertThat(Entry.DateFormat.get()!!.parse(entry?.startedDateTime))
assertThat(Entry.DateFormat.get()!!.parse(entry!!.startedDateTime))
.isEqualTo(Date(transaction.requestDate!!))
}

Expand Down

0 comments on commit f42f0b8

Please sign in to comment.