Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Mon, 15 Jun 2026 06:14:01 +0000 Subject: [pgjdbc/pgjdbc] PR #4172: build: promote MethodCanBeStatic to error level List-Id: X-GitHub-Additions: 1 X-GitHub-Author-Id: 213894 X-GitHub-Author-Login: vlsi X-GitHub-Base: master X-GitHub-Changed-Files: 1 X-GitHub-Commits: 1 X-GitHub-Deletions: 3 X-GitHub-Head-Branch: claude/modest-roentgen-e6b621 X-GitHub-Head-SHA: 6bd07a669cce54f1e8107469ac63ad00b0b0e7b9 X-GitHub-Issue: 4172 X-GitHub-Labels: building-and-testing X-GitHub-Merge-SHA: 12d0065fe7462fa35538a8f9f1b19ebd194d0031 X-GitHub-Merged-By: vlsi X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-State: merged X-GitHub-Type: pull_request X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/4172 Content-Type: text/plain; charset=utf-8 ## 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",