Showing 36 of 74 total issues
Avoid deeply nested control flow statements. Open
Open
if (!matchString.startsWith("!")) { pendingContents.push({ "content": matchText, "contentLineIndex": lineIndex, "contentIndex": referenceIndex + 1,
Function handleRunEnd
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function handleRunEnd(line, lineIndex, contextLength, match, matchIndex, inTable) {
Avoid deeply nested control flow statements. Open
Open
if (shortcutLink) { // Track separately due to ambiguity in "text [text] text" const shortcutData = shortcuts.get(label) || []; shortcutData.push(referenceDatum); shortcuts.set(label, shortcutData);
Avoid deeply nested control flow statements. Open
Open
if (!nestingStyles[nesting]) { nestingStyles[nesting] = (itemStyle === nestingStyles[nesting - 1]) ? differentItemStyle[itemStyle] : itemStyle;
Avoid deeply nested control flow statements. Open
Open
if (!listItemNesting || (fullMatch[fullMatch.length - 1] === ">")) { addErrorContext(onError, lineNumber + i, line, null, null, [1, fullMatch.length], { "editColumn": blockquoteLength + 1, "deleteCount": spaceLength - 1 });
Avoid deeply nested control flow statements. Open
Open
if (match) { context = match[0]; range = [match.index + 1, match[0].length]; }
Avoid deeply nested control flow statements. Open
Open
if (topLevel) { // Calculate line index while (lineOffsets[lineIndex + 1] <= referenceindex) { lineIndex++; }
Consider simplifying this complex logical expression. Open
Open
if (!hasError && ((extraHeadings > 1) || ((extraHeadings === 1) && (requiredHeadings[i] !== "*"))) && (anyHeadings || !requiredHeadings.every((heading) => heading === "*"))) { addErrorContext(onError, params.lines.length, requiredHeadings[i]);
Consider simplifying this complex logical expression. Open
Open
if ((token.type === "bullet_list_open") || (token.type === "ordered_list_open")) { // Save current context and start a new one stack.push(current); current = {
Consider simplifying this complex logical expression. Open
Open
if (!result && (!value || !Array.isArray(value) || (value.length === 0) || !value.every(helpers.isString) || value.some(helpers.isEmptyString))) { result = newError(property); }
Consider simplifying this complex logical expression. Open
Open
if (inCode || onFence || inTable || onBreak || onItemStart ||
Consider simplifying this complex logical expression. Open
Open
if ((fixInfo.lineNumber === lastFixInfo.lineNumber) && (fixInfo.editColumn === lastFixInfo.editColumn) && !fixInfo.insertText && (fixInfo.deleteCount > 0) && lastFixInfo.insertText &&
Function growlNotificationController
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function growlNotificationController($element, $animate, $attrs, $scope, $interval) {
Function GetFile
has 5 return statements (exceeds 4 allowed). Open
Open
func GetFile(ctx context.Context, storageRoot, docUUID string, imageInfo ImageInfo) (string, string, error) { ctx, span := common.TracerWeb.Start(ctx, "GetFile") ctx, spanHttpGet := common.TracerWeb.Start(ctx, "http.Get") resp, err := http.Get(imageInfo.Original.URL)
Avoid too many return
statements within this function. Open
Open
if("illegal"===r.type&&""===o)return 1;if(R>1e5&&R>3*r.index)throw Error("potential infinite loop, way more iterations than matches")
Avoid too many return
statements within this function. Open
Open
;return A+=o,o.length}const w=v(e)