Skip to content

Astyle indent preproc block #1007

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

Merged
merged 2 commits into from
Mar 31, 2020

Conversation

matthijskooijman
Copy link
Contributor

Based on #1006, I quickly tried enabling the astyle ident-preproc-block to see what the impact would be. It produces a rather big diff, but on first glance does improve readability a lot.

Because it changes so much, this would probably mess with open pullrequests, so it might be good to merge those as far as possible (it is probably also possible to update them semi-automatically, but might still be a bit messy).

@fpistm
Copy link
Member

fpistm commented Mar 23, 2020

To have it passed, could you rebase on top of the master, please?
Thanks

@fpistm
Copy link
Member

fpistm commented Mar 23, 2020

Looking at all changes, I will have to update my scripts to generate wrapper files and PinNamesVar.h to indent properly by default.

@matthijskooijman matthijskooijman force-pushed the astyle-indent-preproc-block branch from 7295118 to eb6817c Compare March 23, 2020 09:03
@matthijskooijman
Copy link
Contributor Author

I pushed one more commit to let astyle enforce linux-style line endings. I noticed some CRLF-style files in the jumpsysBL branch, but when adding this option, notice @fpistm had already unified these in master. This just encodes this in the astyle config as well.

@matthijskooijman matthijskooijman force-pushed the astyle-indent-preproc-block branch from aef4a33 to eb6817c Compare March 31, 2020 09:35
This indents preprocessor blocks, making nested preprocessor blocks
easier to read.
This runs `python3 CI/astyle/astyle.py` and commits the result.
@matthijskooijman matthijskooijman force-pushed the astyle-indent-preproc-block branch from eb6817c to 4ab0fc3 Compare March 31, 2020 09:39
@matthijskooijman
Copy link
Contributor Author

What shall we do with this PR? I've just rebased it on top of master again, maybe it could just be merged? There's still a few open PRs that would produce conflicts from this, but most of them are experimental and would need to be mostly redone anyway, I think?

@matthijskooijman matthijskooijman marked this pull request as ready for review March 31, 2020 09:39
@fpistm fpistm merged commit cffb347 into stm32duino:master Mar 31, 2020
@fpistm fpistm linked an issue Mar 31, 2020 that may be closed by this pull request
fpistm added a commit to stm32duino/Arduino_Tools that referenced this pull request Apr 1, 2020
@matthijskooijman matthijskooijman deleted the astyle-indent-preproc-block branch April 27, 2020 13:30
fpistm added a commit to stm32duino/Arduino_Tools that referenced this pull request May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow indenting preprocessor macros?
2 participants