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
56 changes: 30 additions & 26 deletions gradle/error-prone.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ apply plugin: 'net.ltgt.errorprone'

dependencies {
errorprone('com.google.errorprone:error_prone_core:2.42.0')
// bug https://github.com/google/error-prone/issues/5293
// errorprone('com.google.errorprone:error_prone_core:2.43.0')
errorprone('tech.picnic.error-prone-support:error-prone-contrib:0.25.0')
}

Expand Down Expand Up @@ -31,6 +33,7 @@ tasks.withType(JavaCompile).configureEach {
)
error(
'AmbiguousJsonCreator',
'UnnecessarilyFullyQualified',
'AssertJNullnessAssertion',
'AutowiredConstructor',
'CanonicalAnnotationSyntax',
Expand Down Expand Up @@ -61,32 +64,33 @@ tasks.withType(JavaCompile).configureEach {
errorproneArgs.addAll(
'-XepPatchLocation:IN_PLACE',
'-XepPatchChecks:' +
'AmbiguousJsonCreator,' +
'ArrayEquals,' +
'AssertJNullnessAssertion,' +
'AutowiredConstructor,' +
'CanonicalAnnotationSyntax,' +
'CollectorMutability,' +
'ConstantNaming,' +
'DirectReturn,' +
'EmptyMethod,' +
'ExplicitArgumentEnumeration,' +
'ExplicitEnumOrdering,' +
'FormatStringConcatenation,' +
'IdentityConversion,' +
'ImmutablesSortedSetComparator,' +
'IsInstanceLambdaUsage,' +
'MockitoMockClassReference,' +
'MockitoStubbing,' +
'NestedOptionals,' +
'PrimitiveComparison,' +
'RedundantStringConversion,' +
'RedundantStringEscape,' +
'SelfAssignment,' +
'Slf4jLogStatement,' +
'StringJoin,' +
'StringJoining,' +
'TimeZoneUsage,'
'UnnecessarilyFullyQualified,'
// 'AmbiguousJsonCreator,' +
// 'ArrayEquals,' +
// 'AssertJNullnessAssertion,' +
// 'AutowiredConstructor,' +
// 'CanonicalAnnotationSyntax,' +
// 'CollectorMutability,' +
// 'ConstantNaming,' +
// 'DirectReturn,' +
// 'EmptyMethod,' +
// 'ExplicitArgumentEnumeration,' +
// 'ExplicitEnumOrdering,' +
// 'FormatStringConcatenation,' +
// 'IdentityConversion,' +
// 'ImmutablesSortedSetComparator,' +
// 'IsInstanceLambdaUsage,' +
// 'MockitoMockClassReference,' +
// 'MockitoStubbing,' +
// 'NestedOptionals,' +
// 'PrimitiveComparison,' +
// 'RedundantStringConversion,' +
// 'RedundantStringEscape,' +
// 'SelfAssignment,' +
// 'Slf4jLogStatement,' +
// 'StringJoin,' +
// 'StringJoining,' +
// 'TimeZoneUsage,'
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.Properties;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import org.eclipse.cdt.core.ToolFactory;
import org.eclipse.cdt.core.formatter.CodeFormatter;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
Expand All @@ -35,7 +35,7 @@ public EclipseCdtFormatterStepImpl(Properties settings) throws Exception {
Map<String, String> settingsMap = stream.collect(Collectors.toMap(
e -> String.valueOf(e.getKey()),
e -> String.valueOf(e.getValue())));
codeFormatter = org.eclipse.cdt.core.ToolFactory.createDefaultCodeFormatter(settingsMap);
Copy link
Owner Author

@Pankraz76 Pankraz76 Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its working with old version 42.

thanks to @delanym

codeFormatter = ToolFactory.createDefaultCodeFormatter(settingsMap);
}

/** Formatting C/C++ string */
Expand Down
Loading