Skip to content

Commit 6a62596

Browse files
committed
Fix qf
1 parent a902d35 commit 6a62596

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/main/java/org/github/_1c_syntax/bsl/languageserver/diagnostics/NestedConstructorsInStructureDeclarationDiagnostic.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@
4444
@DiagnosticMetadata(
4545
type = DiagnosticType.CODE_SMELL,
4646
severity = DiagnosticSeverity.MINOR,
47-
minutesToFix = 10,
48-
scope = DiagnosticScope.ALL
47+
scope = DiagnosticScope.ALL,
48+
minutesToFix = 10
4949
)
50-
5150
public class NestedConstructorsInStructureDeclarationDiagnostic extends AbstractVisitorDiagnostic {
5251

5352
private Collection<ParseTree> nestedNewContext = new ArrayList<>();
@@ -79,9 +78,9 @@ public ParseTree visitNewExpression(NewExpressionContext ctx) {
7978
.forEach(parseTree -> Trees.findAllRuleNodes(parseTree, BSLParser.RULE_newExpression)
8079
.stream()
8180
.limit(1)
82-
.filter(newContext -> {
81+
.filter((ParseTree newContext) -> {
8382
BSLParser.DoCallContext doCallContext = ((NewExpressionContext) newContext).doCall();
84-
return doCallContext != null && doCallContext.callParamList().callParam().size() > 0;
83+
return doCallContext != null && !doCallContext.callParamList().callParam().isEmpty();
8584
}
8685
).collect(Collectors.toCollection(() -> nestedNewContext)));
8786

src/main/java/org/github/_1c_syntax/bsl/languageserver/providers/DiagnosticProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,4 +350,4 @@ private boolean isEnabled(Class<? extends BSLDiagnostic> diagnosticClass) {
350350
|| diagnosticConfiguration.isRight()
351351
|| (diagnosticConfiguration.isLeft() && diagnosticConfiguration.getLeft());
352352
}
353-
}
353+
}

0 commit comments

Comments
 (0)