Skip to content

Commit 7679815

Browse files
committed
Change severity of CanonicalAnnotationSyntax rule to error
1 parent 1fe0e3b commit 7679815

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ tasks.withType<JavaCompile>().configureEach {
5252
"TimeZoneUsage",
5353
)
5454
error(
55+
"CanonicalAnnotationSyntax",
5556
"PackageLocation",
5657
"RedundantStringConversion",
5758
"RedundantStringEscape",

junit-platform-console/src/main/java/org/junit/platform/console/options/TestDiscoveryOptionsMixin.java

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -154,22 +154,18 @@ public static class FilterOptions {
154154
+ "When this option is repeated, all patterns will be combined using OR semantics.")
155155
private final List<String> excludeClassNamePatterns = new ArrayList<>();
156156

157-
@Option(names = {
158-
"--include-package" }, paramLabel = "PKG", arity = "1", description = "Provide a package to be included in the test run. This option can be repeated.")
157+
@Option(names = "--include-package", paramLabel = "PKG", arity = "1", description = "?Provide a package to be included in the test run. This option can be repeated.")
159158
private final List<String> includePackages = new ArrayList<>();
160159

161-
@Option(names = {
162-
"--exclude-package" }, paramLabel = "PKG", arity = "1", description = "Provide a package to be excluded from the test run. This option can be repeated.")
160+
@Option(names = "--exclude-package", paramLabel = "PKG", arity = "1", description = "Provide a package to be excluded from the test run. This option can be repeated.")
163161
private final List<String> excludePackages = new ArrayList<>();
164162

165-
@Option(names = {
166-
"--include-methodname" }, paramLabel = "PATTERN", arity = "1", description = "Provide a regular expression to include only methods whose fully qualified names without parameters match. " //
167-
+ "When this option is repeated, all patterns will be combined using OR semantics.")
163+
@Option(names = "--include-methodname", paramLabel = "PATTERN", arity = "1", description = "Provide a regular expression to include only methods whose fully qualified names without parameters match. " //
164+
+ "When this option is repeated, all patterns will be combined using OR semantics.")
168165
private final List<String> includeMethodNamePatterns = new ArrayList<>();
169166

170-
@Option(names = {
171-
"--exclude-methodname" }, paramLabel = "PATTERN", arity = "1", description = "Provide a regular expression to exclude those methods whose fully qualified names without parameters match. " //
172-
+ "When this option is repeated, all patterns will be combined using OR semantics.")
167+
@Option(names = "--exclude-methodname", paramLabel = "PATTERN", arity = "1", description = "Provide a regular expression to exclude those methods whose fully qualified names without parameters match. " //
168+
+ "When this option is repeated, all patterns will be combined using OR semantics.")
173169
private final List<String> excludeMethodNamePatterns = new ArrayList<>();
174170

175171
@Option(names = { "-t",
@@ -216,8 +212,7 @@ public static class RuntimeConfigurationOptions {
216212
// Implementation note: the @Option annotation is on a setter method to allow validation.
217213
private final Map<String, String> configurationParameters = new LinkedHashMap<>();
218214

219-
@Option(names = {
220-
"--config-resource" }, paramLabel = "PATH", arity = "1", description = "Set configuration parameters for test discovery and execution via a classpath resource. This option can be repeated.")
215+
@Option(names = "--config-resource", paramLabel = "PATH", arity = "1", description = "Set configuration parameters for test discovery and execution via a classpath resource. This option can be repeated.")
221216
private List<String> configurationParametersResources = new ArrayList<>();
222217

223218
@CommandLine.Spec

junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineExecutionOrchestrator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void execute(InternalTestPlan internalTestPlan, NamespacedHierarchicalStore<Name
7474
* {@linkplain TestExecutionListener testExecutionListener} of execution
7575
* events.
7676
*/
77-
@API(status = INTERNAL, since = "1.9", consumers = { "org.junit.platform.suite.engine" })
77+
@API(status = INTERNAL, since = "1.9", consumers = "org.junit.platform.suite.engine")
7878
public void execute(LauncherDiscoveryResult discoveryResult, EngineExecutionListener engineExecutionListener,
7979
TestExecutionListener testExecutionListener, NamespacedHierarchicalStore<Namespace> requestLevelStore,
8080
CancellationToken cancellationToken) {
@@ -166,7 +166,7 @@ private void withInterceptedStreams(ConfigurationParameters configurationParamet
166166
* discovery results} and notifies the supplied {@linkplain
167167
* EngineExecutionListener listener} of execution events.
168168
*/
169-
@API(status = INTERNAL, since = "1.7", consumers = { "org.junit.platform.testkit" })
169+
@API(status = INTERNAL, since = "1.7", consumers = "org.junit.platform.testkit")
170170
public void execute(LauncherDiscoveryResult discoveryResult, EngineExecutionListener engineExecutionListener,
171171
NamespacedHierarchicalStore<Namespace> requestLevelStore, CancellationToken cancellationToken) {
172172
Preconditions.notNull(discoveryResult, "discoveryResult must not be null");

0 commit comments

Comments
 (0)