Skip to content

Commit

Permalink
Исправлено падение линз сложности при ошибке парсинга
Browse files Browse the repository at this point in the history
  • Loading branch information
nixel2007 committed Feb 11, 2025
1 parent 3796358 commit 8e4d3a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public List<CodeLens> getCodeLenses(DocumentContext documentContext) {
var complexityThreshold = getComplexityThreshold();
var methodsComplexity = getMethodsComplexity(documentContext);
return documentContext.getSymbolTree().getMethods().stream()
.filter(methodSymbol -> methodsComplexity.get(methodSymbol) >= complexityThreshold)
.filter(methodSymbol -> methodsComplexity.getOrDefault(methodSymbol, DEFAULT_COMPLEXITY_THRESHOLD - 1) >= complexityThreshold)
.map(methodSymbol -> toCodeLens(methodSymbol, documentContext))
.collect(Collectors.toList());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@

Процедура ИмяПроцедуры2()
КонецПроцедуры

Процедура ()
КонецПроцедуры

0 comments on commit 8e4d3a6

Please sign in to comment.