Enable strict + fatal warnings for all Scala projects#597
Merged
Conversation
added 2 commits
May 26, 2026 23:37
Drop the three remaining `scala.strict: false` opt-outs (bleep-nosbt, bleep-bsp-tests, bleep-tests) and add `-Werror` to the shared template-common scalac options so every Scala project is now compiled under tpolecat strict mode with fatal warnings. All 25 projects compile cleanly under the stricter settings.
Follow-up to enabling strict + fatal warnings: addresses the warnings the previous commit only surfaced (the prior local clean compile passed under a stale BSP server, so CI was the first run to actually exercise -Werror). Sources: - bleep-bsp / bleep-core / bleep-cli / bleep-model / scripts: drop a handful of unused imports, unused private members, an unreachable catch case, a deprecated Set.+ call, a stale parameter, and the buildTargetScalaTestClasses deprecation. ZincBridge's ThreadDeath match now goes via class-name to avoid the deprecated type reference under -Werror. SymbolProcessorOptions adds the missing `using` keyword. - scripts/GenNativeImage: rewrite the chained sb.append builders as single interpolated appends so the discarded StringBuilder result no longer warns. - bleep-bsp-tests / bleep-tests: clean up unused imports and dead vals/params surfaced when -Werror reached test code. bleep.yaml: - bleep-nosbt suppresses E176 (unused value) — the liberated sbt / contraband-generated code intentionally discards Int returns from fluent builder APIs. - New template-test silences E175 + E176 + the "alphanumeric infix" warning for test projects; scalatest's `assert(...)` / `shouldBe` trip them by design. All 25 projects clean-compile with 0 warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scala.strict: falseopt-outs (bleep-nosbt,bleep-bsp-tests,bleep-tests) so every Scala project inherits tpolecat strict mode fromtemplate-common.-Werrortotemplate-common.scala.optionsto make warnings fatal everywhere.All 25 projects clean-compile under the new settings — no source changes were required.
Test plan
bleep clean(all 25 projects) followed bybleep compilesucceeds with 0 errors / 0 warningsbleep build showconfirms-Werrorandstrict: truereach the previously-opted-out projects🤖 Generated with Claude Code