add tool to "enforce" semantic line breaks
See #1132
Run it so:
cd ci/semantic-line-breaks
cargo run --- ../../src [--overwrite]
Diff is large, so maybe should be automated.
I don't have an objection to enforcing sembr but the implementation does look fragile, e.g. there's no tokenizer. Have you considered using an existing tool like https://github.com/bobheadxi/readable?
I have not... thanks for the suggestion, will have a look.
I have tried using readable to have a GitHub action that runs check, and format all the existing code, but the tool is immature, it gave errors for some files saying Cannot take length of multi-line node '[object Object]' (https://github.com/bobheadxi/readable/issues/18) and for others the aforementioned issue is there, it does the wrong thing when it encounters e.g.(https://github.com/bobheadxi/readable/issues/17). I am not sure what should be done here, make readable better or create another tool?
This tool of mine handles both issues without choking. I intend to get back to making it more fancy... I keep postponing.