pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: vlsi (@vlsi) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] PR #4172: build: promote MethodCanBeStatic to error level
Date: Mon, 15 Jun 2026 06:14:01 +0000
Message-ID: <[email protected]> (raw)
## What
Move the `MethodCanBeStatic` Error Prone check from `enable(...)` to the `error(...)` block in `build-logic.errorprone.gradle.kts`.
## Why
`MethodCanBeStatic` was only emitting a warning, which is easy to overlook. Promoting it to error level makes methods that can be made `static` fail the build, keeping the codebase consistent.
## Notes for reviewers
This affects the main `JavaCompile` tasks only; test code already has Error Prone disabled, so the new error level does not apply there.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
diff --git a/build-logic/verification/src/main/kotlin/build-logic.errorprone.gradle.kts b/build-logic/verification/src/main/kotlin/build-logic.errorprone.gradle.kts
index 7b9875fb6e..c82bdf1bab 100644
--- a/build-logic/verification/src/main/kotlin/build-logic.errorprone.gradle.kts
+++ b/build-logic/verification/src/main/kotlin/build-logic.errorprone.gradle.kts
@@ -31,12 +31,10 @@ if (!project.hasProperty("skipErrorprone")) {
disableWarningsInGeneratedCode.set(true)
errorproneArgs.add("-XepExcludedPaths:.*/translation/messages_.*.java")
error(
+ "MethodCanBeStatic",
"PackageLocation",
"UnusedVariable",
)
- enable(
- "MethodCanBeStatic",
- )
disable(
"EqualsGetClass",
"InlineMeSuggester",
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] PR #4172: build: promote MethodCanBeStatic to error level
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox