Showing 236 of 328 total issues
Avoid deeply nested control flow statements. Open
Open
if (ch === 13 && source.charCodeAt(index + 1) === 10) {
++index;
}
Avoid deeply nested control flow statements. Open
Open
if (index >= length) {
throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
}
Avoid deeply nested control flow statements. Open
Open
if (expr.argument.type === Syntax.ObjectPattern) {
throwError({}, Messages.ObjectPatternAsSpread);
}
Avoid deeply nested control flow statements. Open
Open
if (expr.type !== Syntax.MemberExpression && expr.type !== Syntax.CallExpression && expr.type !== Syntax.NewExpression) {
throwError({}, Messages.InvalidLHSInAssignment);
}
Avoid deeply nested control flow statements. Open
Open
if (isOctalDigit(ch)) {
code = '01234567'.indexOf(ch);
// \0 is not octal escape sequence
if (code !== 0) {
Avoid deeply nested control flow statements. Open
Open
if (index >= length) {
throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
}
Method items_html
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def items_html
return unless items = @schema["items"]
return if items.size == 0
html = ""
- 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
Avoid deeply nested control flow statements. Open
Open
for (var i = 0; i < parentNode.params.length; i++) {
param = parentNode.params[i];
if (param.type === Syntax.Identifier) {
state.localScope.identifiers[param.name] = true;
}
Function performRequest
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
performRequest: function(host, method, template, values, payload, contentType) {
Avoid deeply nested control flow statements. Open
Open
if (index >= length) {
throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
}
Avoid deeply nested control flow statements. Open
Open
if (ch === '*') {
ch = source[index];
if (ch === '/') {
comment = comment.substr(0, comment.length - 1);
blockComment = false;
Avoid deeply nested control flow statements. Open
Open
if (ch === '/') {
loc = {
start: {
line: lineNumber,
column: index - lineStart
Method properties_html
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def properties_html
properties = if (props = @schema["properties"]).present?
props
elsif (ref_path = @schema["$ref"]).present?
ref = Lurker::RefObject.new(ref_path, options[:root_path])
- 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
Avoid deeply nested control flow statements. Open
Open
} else if (isWhiteSpace(ch.charCodeAt(0))) {
++index;
} else if (isLineTerminator(ch.charCodeAt(0))) {
++index;
if (ch === '\r' && source[index] === '\n') {
Consider simplifying this complex logical expression. Open
Open
if (checkToken &&
checkToken.type === 'Keyword' &&
(checkToken.value === 'if' ||
checkToken.value === 'while' ||
checkToken.value === 'for' ||
Function _writeUInt32
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function _writeUInt32 (buf, value, offset, littleEndian, noAssert) {
Function _writeInt32
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function _writeInt32 (buf, value, offset, littleEndian, noAssert) {
Function _findMapping
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
aColumnName, aComparator) {
Function SourceNode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
Function _writeFloat
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function _writeFloat (buf, value, offset, littleEndian, noAssert) {