Closed kiri11 closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 91.26%. Comparing base (
e20e757
) to head (3dc3480
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
✨ Thanks! ✨
Don't allow no space no parentheses after
if
.Summary
There should be a validation for
If
node similar to others such asWhile
orAssert
to not allow generating incorrect code. There is even a TODO left for that reason.Let me know if there should be other validations for
If
.Test Plan
Before:
With the current version of LibCST it is possible to generate the code like this with an
If
node followed byName('x')
without space:which isn't correct Syntax.
The new test fails:
After:
Attempting to generate incorrect code raises an exception preventing it:
The new test passes: