Skip to content

Commit 421b688

Browse files
committed
chore: Require astyle 3.4.13 and switch to --project
- 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`
1 parent e55ca92 commit 421b688

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

runastyle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ cd $SCRIPT_DIR
1111
# To require a newer astyle version, update ASTYLE_VERSION below.
1212
# ASTYLE_VERSION_STR is then constructed to match the beginning of the
1313
# version string reported by "astyle --version".
14-
ASTYLE_VERSION="3.0.1"
14+
ASTYLE_VERSION="3.4.13"
1515
ASTYLE_VERSION_STR="Artistic Style Version ${ASTYLE_VERSION}"
1616
ASTYLE="astyle"
1717

@@ -22,5 +22,6 @@ if [[ "$DETECTED_VERSION_STR" != ${ASTYLE_VERSION_STR}* ]]; then
2222
exit 1;
2323
fi
2424

25-
$ASTYLE --options="$SCRIPT_DIR/.astylerc" *.cpp
26-
$ASTYLE --options="$SCRIPT_DIR/.astylerc" *.h
25+
# Run astyle with the project config
26+
$ASTYLE --project *.cpp
27+
$ASTYLE --project *.h

runastyle.bat

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ CD /d %SCRIPT_DIR%
1414
REM To require a newer astyle version, update ASTYLE_VERSION below.
1515
REM ASTYLE_VERSION_STR is then constructed to match the beginning of the
1616
REM version string reported by "astyle --version".
17-
SET ASTYLE_VERSION="3.0.1"
17+
SET ASTYLE_VERSION="3.4.13"
1818
SET ASTYLE_VERSION_STR="Artistic Style Version %ASTYLE_VERSION%"
1919
SET ASTYLE="astyle"
2020

@@ -28,8 +28,9 @@ ECHO %DETECTED_VERSION_STR% | FINDSTR /B /C:%ASTYLE_VERSION_STR% > nul && (
2828
GOTO EXIT_ERROR
2929
)
3030

31-
%ASTYLE% --options="%SCRIPT_DIR%/.astylerc" *.cpp
32-
%ASTYLE% --options="%SCRIPT_DIR%/.astylerc" *.h
31+
REM Run astyle with the project config
32+
%ASTYLE% --project *.cpp
33+
%ASTYLE% --project *.h
3334
GOTO :EOF
3435

3536
:EXIT_ERROR

0 commit comments

Comments
 (0)