itachi1706/CheesecakeUtilities

View on GitHub

Showing 518 of 532 total issues

Avoid too many return statements within this method.
Open

                    return;

    Avoid too many return statements within this method.
    Open

            if (score >= 51) return "Fail (Active)/Pass (NSMen)";

      Avoid too many return statements within this method.
      Open

              return super.onOptionsItemSelected(item);

        Avoid too many return statements within this method.
        Open

                    if (value <= 100) return if (nightMode) ColorUtils.LIGHT_BLUE else ColorUtils.BLUE

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

                  val db = GpaCalcFirebaseUtils.getGpaDatabaseUser(userId).child(selectedInstitution!!.shortName).child(GpaCalcFirebaseUtils.FB_REC_SEMESTER)
          app/src/main/java/com/itachi1706/cheesecakeutilities/modules/gpacalculator/AddModuleActivity.kt on lines 134..134

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 60.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                  string.append("Optical Image Stabilization: ${isStateAvailable(CameraCharacteristics.LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION, c, CaptureRequest.LENS_OPTICAL_STABILIZATION_MODE_ON)}\n")
          app/src/main/java/com/itachi1706/cheesecakeutilities/modules/cameraviewer/Camera2BasicFragment.kt on lines 357..357

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 60.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                  string.append("Electronic Image Stabilization: ${isStateAvailable(CameraCharacteristics.CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES, c, CaptureRequest.CONTROL_VIDEO_STABILIZATION_MODE_ON)}\n")
          app/src/main/java/com/itachi1706/cheesecakeutilities/modules/cameraviewer/Camera2BasicFragment.kt on lines 356..356

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 60.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

                  val db = GpaCalcFirebaseUtils.getGpaDatabaseUser(userId).child(selectedInstitution!!.shortName).child(GpaCalcFirebaseUtils.FB_REC_SEMESTER)
          app/src/main/java/com/itachi1706/cheesecakeutilities/modules/gpacalculator/AddSemesterActivity.kt on lines 137..137

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 60.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          These nested if statements could be combined
          Open

                      if (resultCode == RESULT_CANCELED) {
                          finish();
                      }

          CollapsibleIfStatements

          Since: PMD 3.1

          Priority: Medium

          Categories: Style

          Remediation Points: 50000

          Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

          Example:

          void bar() {
           if (x) { // original implementation
           if (y) {
           // do stuff
           }
           }
          }
          
          void bar() {
           if (x && y) { // optimized implementation
           // do stuff
           }
          }

          These nested if statements could be combined
          Open

                      if (isValidMove(gameBoard, 4))
                      {
                          makeMove(4);
                          return;
                      }

          CollapsibleIfStatements

          Since: PMD 3.1

          Priority: Medium

          Categories: Style

          Remediation Points: 50000

          Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

          Example:

          void bar() {
           if (x) { // original implementation
           if (y) {
           // do stuff
           }
           }
          }
          
          void bar() {
           if (x && y) { // optimized implementation
           // do stuff
           }
          }

          These nested if statements could be combined
          Open

                          if (counterThread.isAlive()) {
                              counterThread.interrupt();
                          }

          CollapsibleIfStatements

          Since: PMD 3.1

          Priority: Medium

          Categories: Style

          Remediation Points: 50000

          Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

          Example:

          void bar() {
           if (x) { // original implementation
           if (y) {
           // do stuff
           }
           }
          }
          
          void bar() {
           if (x && y) { // optimized implementation
           // do stuff
           }
          }

          TODO found
          Open

              <!-- TODO: Remove after BackupHelper no longer use -->
          Severity: Minor
          Found in app/src/main/AndroidManifest.xml by fixme

          TODO found
          Open

                      // TODO: NDEF is removed in API 34, remove functionality

          TODO found
          Open

              // TODO: Get user to select folder to backup to basically

          TODO found
          Open

                  // TODO (CUTILAND-389): Deprecate with Android 10 targetSDK and compileSDK. See CUTILAND-402

          TODO found
          Open

              <!-- TODO: Verify if this actually need -->
          Severity: Minor
          Found in app/src/main/AndroidManifest.xml by fixme

          TODO found
          Open

              // TODO: No longer possible to do so since SDK 29 (Android 10). Migrate this to companion app if possible

          TODO found
          Open

                      // TODO: Look into this (!!) and improve it as we cannot assure that the package name is not null

          TODO found
          Open

                  // TODO (CUTILAND-402): Seems like it could also be caused by an android bug on Android 10 devices. See a/145231213 and a/142740104

          TODO found
          Open

              // TODO: material-dialogs 2.0.0 breaks a lot of stuff, find time to migrate shit over
          Severity: Minor
          Found in app/build.gradle.kts by fixme
          Severity
          Category
          Status
          Source
          Language