REPL: warn when a non-last module-level expression result is discarded (BT-979)#1022
REPL: warn when a non-last module-level expression result is discarded (BT-979)#1022
Conversation
…BT-979 - Enable effect-free lint check on module.expressions by default - Add skip_module_expression_lint flag to CompilerOptions for bootstrap-test opt-out - Include Severity::Lint in REPL compiler port warnings so users see the hint - Add tests for module-level expression linting (default-on and opt-out) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (7)
📝 WalkthroughWalkthroughAdds a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
Summary
module.expressionsby default, so REPL users see warnings when expression results are silently discarded (e.g.,#{#x => 1} #{#y => 2}where the first map literal is discarded)skip_module_expression_lintflag toCompilerOptionsso bootstrap-test compilation can opt out (test fixtures intentionally use top-level expressions with// =>assertions)Severity::LintdiagnosticsLinear issue: https://linear.app/beamtalk/issue/BT-979
Key Changes
CompilerOptionsgainsskip_module_expression_lint: bool(defaultfalse)check_effect_free_statementsnow checksmodule.expressionsunless the flag is setSeverity::Lintwarnings to userstrueto suppress false positivesTest plan
just ci)🤖 Generated with Claude Code
Summary by CodeRabbit