guess-It-SDP/guessIt

View on GitHub

Showing 50 of 201 total issues

Method VideoCallNavHost has 26 lines of code (exceeds 25 allowed). Consider refactoring.
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

        @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

          override fun onCreate(savedInstanceState: Bundle?) {
              super.onCreate(savedInstanceState)
              val i = Intent(this, backgroundMusicService::class.java)
              startService(i)
              setContent {
      Severity: Minor
      Found in app/src/main/java/com/github/freeman/bootcamp/MainMenuActivity.kt - About 1 hr to fix

        Method drawStuff has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                    face: Face,
                    canvas: Canvas,
                    overlayPic: Bitmap,
                    paint: Paint,
                    topFactor: Double,

          Method EditDialog has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              text: MutableState<String>,
              setValue: String = SET_VALUE,
              enterValue: String = ENTER_VALUE,
              keyboardType: KeyboardType = KeyboardType.Text,
              show: MutableState<Boolean>,
          Severity: Minor
          Found in app/src/main/java/com/github/freeman/bootcamp/EditProfileActivity.kt - About 45 mins to fix

            Method createVideoFromImages has 5 arguments (exceeds 4 allowed). Consider refactoring.
            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

              fun MainMenuButton(testTag: String, onClick: () -> Unit, text: String, icon: ImageVector = Icons.Default.Add, enabled: Boolean = true) {
              Severity: Minor
              Found in app/src/main/java/com/github/freeman/bootcamp/MainMenuActivity.kt - About 35 mins to fix

                Method TimerCircles has 5 arguments (exceeds 4 allowed). Consider refactoring.
                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

                      override fun onCreate(savedInstanceState: Bundle?) {
                          super.onCreate(savedInstanceState)
                  
                          setContent {
                              val dbRef = Firebase.database.reference
                  Severity: Minor
                  Found in app/src/main/java/com/github/freeman/bootcamp/EditProfileActivity.kt - About 35 mins to fix

                  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

                      override fun onCreate(savedInstanceState: Bundle?) {
                          super.onCreate(savedInstanceState)
                          val i = Intent(this, backgroundMusicService::class.java)
                          startService(i)
                          setContent {
                  Severity: Minor
                  Found in app/src/main/java/com/github/freeman/bootcamp/MainMenuActivity.kt - About 25 mins to fix

                  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

                  Severity
                  Category
                  Status
                  Source
                  Language