summary
Firemonkey linter currently issues warnings about missing braces for all single-statement blocks (e.g. if (cond) return; must be if (cond) { return; }).
steps to reproduce
- create a userscript with single-line blocks:
if (a !== b) return false;
⛔ actual behaviour
Firemonkey linter complains about missing curly braces:
⚠️ Expected "{" and instead saw "return"
✅ expected behavior
Valid idiomatic code should not produce warnings.
😟 problem
- This rule is causing many noisy lint warnings for otherwise valid code and makes it hard to spot real issues.
- Many developers prefer single-line blocks for brevity. Forcing braces creates a large volume of stylistic warnings that drown out real problems.
💡 proposed solutions
- option to accept brace-less single-statement blocks
- or use a less strict default
- or accept both styles by default and optionally enforce braces only for multi-line blocks.
- Or support common linter config formats (ESLint/.editorconfig) to override this rule.
👍 benefits
- Allowing configuration preserves safety-conscious defaults while reducing noise for users who prefer concise style.
summary
Firemonkey linter currently issues warnings about missing braces for all single-statement blocks (e.g.
if (cond) return;must beif (cond) { return; }).steps to reproduce
⛔ actual behaviour
Firemonkey linter complains about missing curly braces:
⚠️ Expected "{" and instead saw "return"✅ expected behavior
Valid idiomatic code should not produce warnings.
😟 problem
💡 proposed solutions
👍 benefits