Showing 229 of 518 total issues
Avoid too many return
statements within this function. Open
return this.diff_bisect_(text1, text2, deadline);
Avoid too many return
statements within this function. Open
return false
Avoid too many return
statements within this function. Open
return diffs_a.concat([new diff_match_patch.Diff(DIFF_EQUAL, mid_common)],
diffs_b);
Avoid too many return
statements within this function. Open
return 1;
Avoid too many return
statements within this function. Open
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
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;
}
- 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
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) {
- 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
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)
- 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
Function createVersion
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def createVersion(
project: Model[Project],
pending: PendingVersion
)(
implicit ec: ExecutionContext,
- 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"