Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/metricsAnalyzer/languages/jsLikeAnalyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ export class JsLikeMetricsAnalyzer {
private getOperator(node: Parser.SyntaxNode): string | null {
// binary_expression structure: [left, operator, right] — operator always at index 1
const operatorNode = node.child(1);
/* c8 ignore next */
if (!operatorNode) { return null; }
const type = operatorNode.type;
if (type === "&&" || type === "||" || type === "??") { return type; }
Expand Down
1 change: 1 addition & 0 deletions src/metricsAnalyzer/languages/pythonAnalyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ export class PythonMetricsAnalyzer {
const functionName = this.getFunctionName(node, className);

const body = node.childForFieldName("body");
/* c8 ignore next 3 */
if (!body) {
return null;
}
Expand Down