-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
respect signature declaration style. #174
Comments
– and I thought |
Internally, RBS::Inline goes re-formatting RBS using For example, this code will be converted to the aligned RBS:
It seems the writer dropped the parens on reformatting. I'll take a look the module later. |
FYI: I found
|
At present, the result of `Union#to_s` does not respect `RBS/Lint/AmbiguousOperatorPrecedence` cop from rubocop-on-rbs. It would be better to wrap intersections in unions by paranthesis. * Before: `Integer | String & bool` * After: `Integer | (String & bool)` ref: soutaro/rbs-inline#174
At present, the result of `Union#to_s` does not respect `RBS/Lint/AmbiguousOperatorPrecedence` cop from rubocop-on-rbs. It would be better to wrap intersections in unions by paranthesis. * Before: `Integer | String & bool` * After: `Integer | (String & bool)` ref: soutaro/rbs-inline#174
Now I posted ruby/rbs#2231. I hope it will be merged soon. |
At present, the result of `Union#to_s` does not respect `RBS/Lint/AmbiguousOperatorPrecedence` cop from rubocop-on-rbs. It would be better to wrap intersections in unions by paranthesis. * Before: `Integer | String & bool` * After: `Integer | (String & bool)` ref: soutaro/rbs-inline#174
At present, the result of `Union#to_s` does not respect `RBS/Lint/AmbiguousOperatorPrecedence` cop from rubocop-on-rbs. It would be better to wrap intersections in unions by paranthesis. * Before: `Integer | String & bool` * After: `Integer | (String & bool)` ref: soutaro/rbs-inline#174
Currently rbs inline will generate signatures that do not respect the
RBS/Lint/AmbiguousOperatorPrecedence
cop from rubocop-on-rbs.Given the following declaration:
RBS inline will generate the following signature:
Which violates the
RBS/Lint/AmbiguousOperatorPrecedence
cop. I am not suggesting RBS inline should directly support or even acknowledge the existence of the rubocop-on-rbs gem, however it would be pretty nice if it kept the signature how I wrote it so that I don't have to correct the cop violation everytime I regenerate signatures.The text was updated successfully, but these errors were encountered: