Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sdk][andr] upgrade detekt to latest version and fix violations #36

Merged
merged 3 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading