Skip to content

Conversation

sentinelweb
Copy link
Owner

No description provided.

private fun Header(model: CastDialogModel) {
Box(
modifier = Modifier.height(100.dp)
modifier = Modifier.height(108.dp)

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
contentDescription = "Cuer cast transfer",
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSurface),
modifier = Modifier
.size(48.dp)

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSurface),
modifier = Modifier
.size(48.dp)
.padding(8.dp)

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
color = contentColor,
style = MaterialTheme.typography.headlineSmall,
modifier = Modifier
.padding(start = 8.dp),

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
colorFilter = ColorFilter.tint(contentColor),
modifier = Modifier
.padding(8.dp)
.size(24.dp)

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
color = contentColor,
style = MaterialTheme.typography.headlineSmall,
modifier = Modifier
.padding(horizontal = 8.dp, vertical = 4.dp),

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
color = contentColor,
style = MaterialTheme.typography.headlineSmall,
modifier = Modifier
.padding(horizontal = 8.dp, vertical = 4.dp),

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
import uk.co.sentinelweb.cuer.domain.ext.serialise

class NavigationRouter (
class NavigationRouter(

Check warning

Code scanning / detekt

The more parameters a function has the more complex it is. Long parameter lists are often used to control complex algorithms and violate the Single Responsibility Principle. Prefer functions with short parameter lists. Warning

The constructor(activity: Activity, toastWrapper: ToastWrapper, ytJavaApi: PlatformLaunchWrapper, navController: NavController?, log: LogWrapper, urlLauncher: UrlLauncherWrapper, cryptoLauncher: CryptoLauncher) has too many parameters. The current threshold is set to 7.
import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.*

Check warning

Code scanning / detekt

Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning

androidx.compose.runtime.* is a wildcard import. Replace it with fully qualified imports.
import uk.co.sentinelweb.cuer.app.ui.player.PlayerContract.MviStore.Label.Command
import uk.co.sentinelweb.cuer.app.ui.player.PlayerContract.MviStore.Label.None
import uk.co.sentinelweb.cuer.app.ui.player.PlayerContract.PlayerCommand
import uk.co.sentinelweb.cuer.app.ui.player.PlayerContract.View.Event.*

Check warning

Code scanning / detekt

Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning

uk.co.sentinelweb.cuer.app.ui.player.PlayerContract.View.Event.* is a wildcard import. Replace it with fully qualified imports.
import uk.co.sentinelweb.cuer.app.ui.player.PlayerContract.View.Event.*
import uk.co.sentinelweb.cuer.app.util.disk.FullTruncatedPathMapper
import uk.co.sentinelweb.cuer.core.wrapper.LogWrapper
import uk.co.sentinelweb.cuer.domain.PlayerStateDomain.*

Check warning

Code scanning / detekt

Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning

uk.co.sentinelweb.cuer.domain.PlayerStateDomain.* is a wildcard import. Replace it with fully qualified imports.
private val fullTruncatedPathMapper: FullTruncatedPathMapper by inject()

@Composable
fun AndroidVideoUi(view: AndroidVideoPlayerActivity.MviViewImpl) {

Check warning

Code scanning / detekt

One method should have one responsibility. Long methods tend to handle many things at once. Prefer smaller methods to make them easier to understand. Warning

The function AndroidVideoUi is too long (147). The maximum length is 60.
@UnstableApi
class LoggingPlayerListener(
private val tag: String = "LoggingPlayerListener"
class ExoLoggingPlayerListener(

Check warning

Code scanning / detekt

Too many functions inside a/an file/class/object/interface always indicate a violation of the single responsibility principle. Maybe the file/class/object/interface wants to manage too many things at once. Extract functionality which clearly belongs together. Warning

Class 'ExoLoggingPlayerListener' with '31' functions detected. Defined threshold inside classes is set to '11'
PlaybackException.ERROR_CODE_DECODER_INIT_FAILED -> "ERROR_CODE_DECODER_INIT_FAILED"
PlaybackException.ERROR_CODE_DECODER_QUERY_FAILED -> "ERROR_CODE_DECODER_QUERY_FAILED"
PlaybackException.ERROR_CODE_DECODING_FAILED -> "ERROR_CODE_DECODING_FAILED"
PlaybackException.ERROR_CODE_DECODING_FORMAT_EXCEEDS_CAPABILITIES -> "ERROR_CODE_DECODING_FORMAT_EXCEEDS_CAPABILITIES"

Check warning

Code scanning / detekt

Line detected that is longer than the defined maximum line length in the code style. Warning

Line detected that is longer than the defined maximum line length in the code style.
PowerManager.SCREEN_BRIGHT_WAKE_LOCK or PowerManager.ON_AFTER_RELEASE,
"MyApp:VideoWakeLock"
).apply {
acquire(30 * 60 * 1000L) // 30 minutes timeout

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
PowerManager.SCREEN_BRIGHT_WAKE_LOCK or PowerManager.ON_AFTER_RELEASE,
"MyApp:VideoWakeLock"
).apply {
acquire(30 * 60 * 1000L) // 30 minutes timeout

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
PowerManager.SCREEN_BRIGHT_WAKE_LOCK or PowerManager.ON_AFTER_RELEASE,
"MyApp:VideoWakeLock"
).apply {
acquire(30 * 60 * 1000L) // 30 minutes timeout

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
fontFamily = LexendDora,
fontWeight = fontWeightTitle,
fontSize = 28.sp
fontSize = 20.sp

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
fontFamily = LexendDora,
fontWeight = fontWeightTitle,
fontSize = 24.sp
fontSize = 18.sp

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
fontFamily = LexendDora,
fontWeight = fontWeightTitle,
fontSize = 20.sp
fontSize = 16.sp

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.

@Composable
fun View() {
fun TestView() {

Check warning

Code scanning / detekt

One method should have one responsibility. Long methods tend to handle many things at once. Prefer smaller methods to make them easier to understand. Warning

The function TestView is too long (84). The maximum length is 60.
@@ -0,0 +1,54 @@
package uk.co.sentinelweb.cuer.hub.util.sleep

Check warning

Code scanning / detekt

Checks whether files end with a line separator. Warning

The file /home/runner/work/cuer/cuer/hub/src/main/kotlin/uk/co/sentinelweb/cuer/hub/util/sleep/WindowsSleepPreventer.kt is not ending with a new line.
val INSTANCE = Native.load("kernel32", Kernel32Extended::class.java)
}

fun SetThreadExecutionState(esFlags: EXECUTION_STATE): EXECUTION_STATE

Check warning

Code scanning / detekt

Function names should follow the naming convention set in the configuration. Warning

Function names should match the pattern: ([a-z][a-zA-Z0-9]*)|(.\*)
}

@Structure.FieldOrder("value")
class EXECUTION_STATE(var value: DWORD) : DWORD(value.toLong()) {

Check warning

Code scanning / detekt

A class or object's name should fit the naming pattern defined in the projects configuration. Warning

Class and Object names should match the pattern: [A-Z][a-zA-Z0-9]*
// Create an EXECUTION_STATE from the DWORD for the API call
val executionState = EXECUTION_STATE(flags)
Kernel32Extended.INSTANCE.SetThreadExecutionState(executionState)
} catch (e: Exception) {

Check warning

Code scanning / detekt

Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled. Warning

Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.
override fun allowSleep() {
try {
Kernel32Extended.INSTANCE.SetThreadExecutionState(ES_CONTINUOUS)
} catch (e: Exception) {

Check warning

Code scanning / detekt

Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled. Warning

Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.
class LinuxSleepPreventerX11 : SleepPreventer {

private interface X11 : Library {
fun XOpenDisplay(name: String?): Pointer?

Check warning

Code scanning / detekt

Function names should follow the naming convention set in the configuration. Warning

Function names should match the pattern: ([a-z][a-zA-Z0-9]*)|(.\*)

private interface X11 : Library {
fun XOpenDisplay(name: String?): Pointer?
fun XCloseDisplay(display: Pointer)

Check warning

Code scanning / detekt

Function names should follow the naming convention set in the configuration. Warning

Function names should match the pattern: ([a-z][a-zA-Z0-9]*)|(.\*)
private interface X11 : Library {
fun XOpenDisplay(name: String?): Pointer?
fun XCloseDisplay(display: Pointer)
fun XSync(display: Pointer, discard: Boolean)

Check warning

Code scanning / detekt

Function names should follow the naming convention set in the configuration. Warning

Function names should match the pattern: ([a-z][a-zA-Z0-9]*)|(.\*)

// X11's Bool is an int. Use Int 1/0 for suspend flag.
private interface Xss : Library {
fun XScreenSaverSuspend(display: Pointer, suspend: Int)

Check warning

Code scanning / detekt

Function names should follow the naming convention set in the configuration. Warning

Function names should match the pattern: ([a-z][a-zA-Z0-9]*)|(.\*)
xss.XScreenSaverSuspend(dpy, 1)
// Flush requests
x11.XSync(dpy, false)
} catch (t: Throwable) {

Check warning

Code scanning / detekt

Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled. Warning

Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.
// Resume normal screensaver behavior
xss.XScreenSaverSuspend(dpy, 0)
x11.XSync(dpy, false)
} catch (t: Throwable) {

Check warning

Code scanning / detekt

Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled. Warning

Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants