Showing 50 of 201 total issues
Method VideoCallNavHost
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Composable
fun VideoCallNavHost(
modifier: Modifier = Modifier.testTag("video_call_nav_host"),
navController: NavHostController = rememberNavController(),
startDestination: String = "room_screen",
Method init
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@Before
fun init() {
composeRule.setContent {
val context = LocalContext.current
val dbRef = FirebaseUtilities.getGameDBRef(context)
Method onCreate
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val i = Intent(this, backgroundMusicService::class.java)
startService(i)
setContent {
Method drawStuff
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
face: Face,
canvas: Canvas,
overlayPic: Bitmap,
paint: Paint,
topFactor: Double,
Method EditDialog
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
text: MutableState<String>,
setValue: String = SET_VALUE,
enterValue: String = ENTER_VALUE,
keyboardType: KeyboardType = KeyboardType.Text,
show: MutableState<Boolean>,
Method createVideoFromImages
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private fun createVideoFromImages(context: Context, bitmapList: List<Bitmap>, videoName: String, videoDir: File, gameID: String) {
Method MainMenuButton
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
fun MainMenuButton(testTag: String, onClick: () -> Unit, text: String, icon: ImageVector = Icons.Default.Add, enabled: Boolean = true) {
Method TimerCircles
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
fun TimerCircles(modifier: Modifier, activeBarColor: Color, inactiveBarColor: Color, strokeWidth: Dp, value: Float) {
Method onCreate
has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring. Open
Open
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
val dbRef = Firebase.database.reference
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method onCreate
has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring. Open
Open
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val i = Intent(this, backgroundMusicService::class.java)
startService(i)
setContent {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"