◐ Shell
clean mode source ↗

Improve runastyle scripts and update astyle version by jcfr · Pull Request #508 · cppcheck-opensource/simplecpp

added 9 commits

August 25, 2025 19:23
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.

This was referenced

Aug 28, 2025

@jcfr jcfr deleted the improve-runastyle-scripts branch

August 29, 2025 02:23