Skip to content

Conversation

Pankraz76
Copy link
Contributor

 Did you mean 'requireNonNull(version);'?
/Users/vincent.potucek/IdeaProjects/spotless/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/ShellExtension.java:46: Note: [StaticImport] Identifier should be statically imported
		Objects.requireNonNull(version);
		       ^
    (see https://error-prone.picnic.tech/bugpatterns/StaticImport)
  Did you mean 'requireNonNull(version);'?
/Users/vincent.potucek/IdeaProjects/spotless/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/PomExtension.java:49: Note: [StaticImport] Identifier should be statically imported
		Objects.requireNonNull(version);
		       ^
    (see https://error-prone.picnic.tech/bugpatterns/StaticImport)
  Did you mean 'requireNonNull(version);'?
/Users/vincent.potucek/IdeaProjects/spotless/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/PomExtension.java:62: Note: [StaticImport] Identifier should be statically imported
			cfg.version = Objects.requireNonNull(version);
			                     ^
    (see https://error-prone.picnic.tech/bugpatterns/StaticImport)
  Did you mean 'cfg.version = requireNonNull(version);'?
Refactoring changes were successfully applied to file:///Users/vincent.potucek/IdeaProjects/spotless/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/BaseKotlinExtension.java, please check the refactored code and recompile.
Refactoring changes were successfully applied to file:///Users/vincent.potucek/IdeaProjects/spotless/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/PluginGradlePreconditions.java, please check the refactored code and recompile.

on corruption:

				         ^
    (see https://error-prone.picnic.tech/refasterrules/StreamRules#StreamOfArray)
  Did you mean 'Arrays.stream(additionalFileContents));'?
/Users/vincent.potucek/IdeaProjects/spotless/lib/src/main/java/com/diffplug/spotless/protobuf/BufStep.java:108: Note: [Refaster Rule] ImmutableListRules.ImmutableListOf3: Refactoring opportunity
			List<String> args = List.of(exeAbsPath, "format", file.getAbsolutePath());
			                           ^
    (see https://error-prone.picnic.tech/refasterrules/ImmutableListRules#ImmutableListOf3)
  Did you mean 'List<String> args = ImmutableList.of(exeAbsPath, "format", file.getAbsolutePath());'?
/Users/vincent.potucek/IdeaProjects/spotless/lib/src/main/java/com/diffplug/spotless/sql/dbeaver/SQLTokensParser.java:189: Note: [RedundantStringConversion] Avoid redundant string conversions when possible
				return new FormatterToken(TokenType.COMMAND, word + s.toString(), start_pos);
				                                                  ^
    (see https://error-prone.picnic.tech/bugpatterns/RedundantStringConversion)
  Did you mean 'return new FormatterToken(TokenType.COMMAND, word + s, start_pos);'?
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
100 warnings

> Task :lib:compileJava FAILED

[Incubating] Problems report is available at: file:///Users/vincent.potucek/IdeaProjects/spotless/build/reports/problems/problems-report.html
21 actionable tasks: 21 executed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':lib:compileJava'.
> Compilation failed; see the compiler output below.
  /Users/vincent.potucek/IdeaProjects/spotless/lib/src/main/java/com/diffplug/spotless/java/ModuleHelper.java:37: warning: Unsafe is internal proprietary API and may be removed in a future release
  import sun.misc.Unsafe;
                 ^
  1 error
  100 warnings

BUILD FAILED in 24s
Configuration cache entry stored.
14:34:35: Execution finished 'clean assemble'.

relates to:

@Pankraz76 Pankraz76 force-pushed the pr-error-prone-SanityCheck branch from 6d13e79 to da00d3a Compare October 6, 2025 14:09
'AsyncCallableReturnsNull,' +
'AsyncFunctionReturnsNull,' +
'AutoValueBuilderDefaultsInConstructor,' +
'AutoValueConstructorOrderChecker,' +
Copy link
Contributor Author

Choose a reason for hiding this comment

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

might not need all but it should not hurt as its only local and opt-in.

@Pankraz76 Pankraz76 marked this pull request as ready for review October 6, 2025 14:11
@Pankraz76 Pankraz76 force-pushed the pr-error-prone-SanityCheck branch from da00d3a to 75726d1 Compare October 6, 2025 18:29
@Pankraz76 Pankraz76 changed the title Add error-prone.picnic.tech Add error-prone.picnic.tech featuring StaticImport Oct 6, 2025
@Pankraz76 Pankraz76 marked this pull request as draft October 6, 2025 18:58
@Pankraz76 Pankraz76 force-pushed the pr-error-prone-SanityCheck branch from 75726d1 to 7433670 Compare October 7, 2025 09:47
@Pankraz76 Pankraz76 marked this pull request as ready for review October 7, 2025 09:58
@Pankraz76
Copy link
Contributor Author

java.lang.RuntimeException: java.net.SocketTimeoutException: Connect timed out

@Pankraz76 Pankraz76 force-pushed the pr-error-prone-SanityCheck branch from d511b46 to a7f79d2 Compare October 7, 2025 13:30
@Pankraz76
Copy link
Contributor Author

This seems like a good addition to Rewrite, as in some aspects it is superior and has its unique benefits—like every tool has. Of course, they cover the same topic, like MissingOverrideAnnotation, so I'm wondering why we see this changed again. Maybe it's some bug or config issue; it seems to have a great potential when the right tools make the equation round up. It's faster than Rewrite, even though the configuration is not straightforward opt-in like Rewrite. We will work this out and learn on the job while extending the tool.

It's behaving just like Rewrite—failing the build and suggesting changes. The opt-in is quite unique and will not be communicated like in Rewrite, but the changes should be small, like the changesets.

Do you like to see this going on? @nedtwigg Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant