TMCStepper
TMCStepper copied to clipboard
Apply linter to unify formatting of the sources
I noticed that sources have different formatting (spaces vs tabs, alignment of declarations, brackets break, etc). Having unified formatting improves readability, simplifies code reviews, and has a positive impact on maintainability.
(Taken from https://xkcd.com/1285/)
I experimented with clang-format and it formatted sources as expected based on the configuration rules. There are many other formatters, I used clang-format just because it had integration with VS code out of the box, don't mind if you'd recommend considering any other formatter based on your experience.
If you find applying linting rules to the repository valuable, I can sketch the configuration and create Pull request with the changes. Note that there will be a lot of them and some rules might not be available (single line struct definitions for example), all changes will be mechanical though, so no functional regression expected.
Please let me know your thoughts.