-
Notifications
You must be signed in to change notification settings - Fork 56
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
Remove space config #29
Remove space config #29
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic! I reviewed every spec and didn't find a single example out of line with #2.
One thought... I'm not sure what constitutes a breaking change for a formatter, but I imagine suddenly ignoring parts of someone's custom config is one of them, so we should at very least document that in the Changelog. Perhaps we should even detect the no longer supported options, and warn the user at runtime? Not sure how one can warn other than STDERR + bad exit code though, which seems a bit ugly for those running via an editor extension. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gingermusketeer Wow, well done 👍 Thank you 😃
@gingermusketeer One thing. Do you mind to update https://github.com/ruby-formatter/rufo/wiki/Settings? |
@splattael It does not look like it is possible to create a PR against the wiki repo and I don't have permission to update the wiki pages. I could create a gist with the new content if that works? @bessey Good catch, I think detecting invalid config is a great idea, definitely help prevent spelling mistakes causing frustration as well as changes to rufo. I will update the change log when I get a moment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consume_one_dynamic_space()
can lose it's argument
consume_one_dynamic_space_or_newline()
can also lose it's argument
Changes are great - thanks @gingermusketeer ! I think the invalid config detection is a separate PR. I'm undecided whether a typo should cause "no formatting" and an error rather than good formatting and no error? |
@gingermusketeer good job! Thank you! |
@gingermusketeer Oh, right 😳 I've just invited you as a collaborator 😁 |
@splattael Awesome!! Thanks a lot. I have really enjoyed working on this project so far :) |
@mjago Thanks for spotting that. I have merged in the changes from master and cleaned that up. |
Thanks @gingermusketeer ! I formatted the ruby spec corpus with the changes and all looks good from what I have seen. And fast 👍 |
@splattael I have updated the settings page by removing the old config options that were described there. |
@gingermusketeer Thank you! 💚 I've added a warning about the future removal of the remaining settings at https://github.com/ruby-formatter/rufo/wiki/Settings#warning-settings-are-going-away-warning. Feel free to correct my English 😶 |
This removes most of the space related configuration as part of #2. From the current discussions in #2 the changes being made here appear to have agreement on the behaviour.
The remaining configuration related to spacing had some discussion around it so I think it would be best to address that in a separate PR.
This is quite a big diff :( let me know if I should break this up!