Skip to content

Commit

Permalink
[sdk][andr] upgrade detekt to latest version and fix violations (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
murki authored Sep 11, 2024
1 parent 44c9f36 commit 5476645
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ class ContextHolder : Initializer<ContextHolder> {
return emptyList()
}

/**
* A way to access the Context and Initializer status for the Bitdrift SDK.
*/
companion object {
@SuppressLint("StaticFieldLeak")
@Volatile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,28 @@ package io.bitdrift.capture
* @property value the numeric representation of the log level.
*/
enum class LogLevel(val value: Int) {
/**
* Represents an error log level, which is the most severe log level.
*/
ERROR(4),

/**
* Represents a warning log level, which is less severe than error.
*/
WARNING(3),

/**
* Represents an info log level, which is less verbose than debug.
*/
INFO(2),

/**
* Represents a debug log level, which is more verbose than info.
*/
DEBUG(1),

/**
* Represents a trace log level, which is the most verbose log level.
*/
TRACE(0),
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,48 @@ package io.bitdrift.capture
* @property value the numeric representation of the log type.
*/
enum class LogType(val value: Int) {
/**
* Represents a normal log type, from consumer apps code.
*/
NORMAL(0),

/**
* Represents a replay log type, from session replay.
*/
REPLAY(1),

/**
* Represents a lifecycle log type, from automatic instrumentation.
*/
LIFECYCLE(2),

/**
* Represents a resource log type, from automatic instrumentation.
*/
RESOURCE(3),

/**
* Represents an internal SDK log type, from the SDK itself.
*/
INTERNALSDK(4),

/**
* Represents a view lifecycle log type, from automatic instrumentation.
*/
VIEW(5),

/**
* Represents a device log type, from automatic instrumentation.
*/
DEVICE(6),

/**
* Represents a UX interaction log type, from automatic instrumentation.
*/
UX(7),

/**
* Represents a span log type, from automatic instrumentation.
*/
SPAN(8),
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,19 @@ data class HttpResponse @JvmOverloads constructor(
* Represents the result of an http request operation
*/
enum class HttpResult {
/**
* Represents a successful http request operation
*/
SUCCESS,

/**
* Represents a failed http request operation
*/
FAILURE,

/**
* Represents an interrupted or incomplete http request operation
*/
CANCELED,
}
}
2 changes: 1 addition & 1 deletion platform/jvm/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ appcompat = "1.5.1"
assertjCore = "3.22.0"
androidxCore = "1.9.0"
androidxTestCore = "1.6.0"
detektPlugin = "1.23.3"
detektPlugin = "1.23.7"
dokkaPlugin = "1.9.20"
gson = "2.10.1"
jsr305 = "3.0.2"
Expand Down

0 comments on commit 5476645

Please sign in to comment.