1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00
cdt/releng/scripts/do_format_code.sh
Jonah Graham 6233337560 [releng] Split up check_code_cleanliness script
As more checks have been added it has gotten a little unweildy.

The new script "do_all_code_cleanups.sh" now does most of the code
formatting checks.

Change-Id: I65fd888c88e1d7e470ed5621cee18ff3bf6680b4
2020-08-30 20:09:50 -04:00

23 lines
649 B
Bash
Executable file

#!/bin/bash
set -e
##
# This script is reused by other projects, if so, COREPROJECT should be set
# to the project to use a basis for project settings
##
: ${COREPROJECT:=core/org.eclipse.cdt.core}
##
# Format code
##
: ${ECLIPSE:=~/buildtools/eclipse-SDK-4.13/eclipse}
if test -e check_code_cleanliness_workspace; then
echo check_code_cleanliness_workspace needs to be deleted
exit 1
fi
${ECLIPSE} \
-consolelog -nosplash -application org.eclipse.jdt.core.JavaCodeFormatter \
-config $PWD/$COREPROJECT/.settings/org.eclipse.jdt.core.prefs \
$PWD -data check_code_cleanliness_workspace
rm -rf check_code_cleanliness_workspace