MiniDigger/Hangar

View on GitHub

Showing 229 of 518 total issues

Avoid too many return statements within this function.
Open

  return this.diff_bisect_(text1, text2, deadline);
Severity: Major
Found in ore/public/diff-match-patch/javascript/diff_match_patch_uncompressed.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return false
    Severity: Major
    Found in ore/public/bootstrap/js/bootstrap.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return diffs_a.concat([new diff_match_patch.Diff(DIFF_EQUAL, mid_common)],
                                diffs_b);
      Severity: Major
      Found in ore/public/diff-match-patch/javascript/diff_match_patch_uncompressed.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

              return 1;
        Severity: Major
        Found in ore/public/diff-match-patch/javascript/diff_match_patch_uncompressed.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
          Severity: Major
          Found in ore/public/bootstrap/js/bootstrap.js - About 30 mins to fix

            Function diff_commonPrefix has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            diff_match_patch.prototype.diff_commonPrefix = function(text1, text2) {
              // Quick check for common null cases.
              if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) {
                return 0;
              }
            Severity: Minor
            Found in ore/public/diff-match-patch/javascript/diff_match_patch_uncompressed.js - 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

            Function patch_addContext_ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            diff_match_patch.prototype.patch_addContext_ = function(patch, text) {
              if (text.length == 0) {
                return;
              }
              if (patch.start2 === null) {
            Severity: Minor
            Found in ore/public/diff-match-patch/javascript/diff_match_patch_uncompressed.js - 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

            Function checkConfirmation has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

              private def checkConfirmation(version: Model[Version], token: Option[String])(
                  implicit req: ProjectRequest[_]
              ): IO[Boolean] = {
                if (version.reviewState == ReviewState.Reviewed)
                  IO.pure(true)
            Severity: Minor
            Found in ore/app/controllers/project/Versions.scala - 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

            Function createVersion has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

              def createVersion(
                  project: Model[Project],
                  pending: PendingVersion
              )(
                  implicit ec: ExecutionContext,
            Severity: Minor
            Found in orePlayCommon/app/ore/models/project/factory/ProjectFactory.scala - 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