-
Notifications
You must be signed in to change notification settings - Fork 94
Improve runastyle scripts and update astyle version #508
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
Conversation
This change updates the runastyle scripts to set the working directory to the script's directory, ensuring consistent behavior regardless of the initial execution location.
This change introduces a `.astylerc` configuration file to centralize and simplify the astyle settings for both the runastyle script and IDE integration.
This change applies code formatting to the source files using astyle version 3.0.1 according to the project's style guidelines.
This refactor introduces a dedicated `ASTYLE_VERSION` variable (formatted as `X.Y.Z`) and derives `ASTYLE_VERSION_STR` automatically. This separation makes it clearer where to update the required version and ensures consistency across platforms. The change simplifies maintenance and prepares the scripts for use with command runners such as `pipx` or `uvx`.
This change simplifies the Windows batch script by using "@echo OFF" to reduce unnecessary output, making the script cleaner and easier to read.
This change adds the missing `EXIT_ERROR` label to the `runastyle.bat` script, ensuring proper error handling and exit status.
- Bump required astyle from 3.0.1 to 3.4.13 to enable easy installs via pipx/uvx from PyPI. - Keep formatting stable: 3.4.13 matches our current output, whereas 3.6.9 changes continuation-line indentation (e.g., after &&). - Use `--project` (available since 3.2) instead of `--options` to simplify config discovery. No formatting diffs expected with the current `.astylerc`
This change improves the runastyle scripts to support multiple ways of invoking astyle.
This change simplifies the runastyle script by combining the invocation of the astyle executable for both .h and .cpp files into a single command.
While working on finalizing #448, I realized that astyle integration could be further improved to simplify the developer experience. Once this is integrated, I suggest we also introduce a workflow running astyle |
Cppcheck has moved to uncrustify quite a while ago, so simplecpp should probably do the same. |
Thanks for the review.
Given limited bandwidth, I will not be able to switch to uncrustify. In the meantime, I think moving forward with this may be sensible as it allow contributor to apply the formatting. |
I leave that up to @danmar. |
Thanks for the taking the time to review 🙏 While I understand we could switch to Once the GitHub workflow have been enabled and the test pass, I believe this will be ready for integration 🚀 |
Thank you for this contribution but I fear that I feel we should switch to uncrustify instead asap. If you don't have the bandwidth I understand. But we more or less just need to copy the runformat script from the cppcheck repo and reuse all the options.. |
Thanks for the feedback. I agree that moving to uncrustify makes sense long-term, and I understand the idea of reusing the In the meantime, I believe these small changes still help streamline the contribution process for new contributors. To keep things clear and incremental, I’ll follow up with two pull requests:
This way the repo stays consistent and contributors won’t be confused by stale formatting instructions while the switch to uncrustify is being worked out. |
This pull request improve the runastyle scripts for easier use:
.astylerc
file.pipx
anduvx
ifastyle
is not available in thePATH
."@echo off"
and proper error handling..h
and.cpp
files into a single command.