1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 06:02:11 +02:00
cdt/releng/scripts/do_format_code.sh
Jonah Graham cc66780e92 Cleanup CDT repo related to the docker + Java 21 updates
- Fix links for cdt-infra
- The cdt-infra git repo is now archived, so this commit updates
the links to the current values.
- Add new Docker related files to the gitattributes as text files
- Update DEFAULT_BUFFER_SIZE for Java 21's value when building JNI,
this also means the dll/exe need a rebuild
- add a toolchains.xml since we use Java 21 toolchain, but most bundles
are Java 17 still
2024-04-26 20:26:40 -04:00

44 lines
1.6 KiB
Bash
Executable file

#!/bin/bash
###############################################################################
# Copyright (c) 2018, 2020 Kichwa Coders Ltd and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
###############################################################################
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
##
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
CDTDIR=${DIR}/../..
: ${COREPROJECT:=core/org.eclipse.cdt.core}
##
# Format code
##
: ${ECLIPSE:=~/buildtools/eclipse-SDK-4.31/eclipse}
if test ! -e "$ECLIPSE" ; then
echo "The Eclipse binary was not found at \"$ECLIPSE\"!"
echo "You can download it to and pass it via environment variable:"
echo " curl -L https://download.eclipse.org/eclipse/downloads/drops4/R-4.31-202402290520/eclipse-SDK-4.31-linux-gtk-x86_64.tar.gz | tar xzC /tmp"
echo " ECLIPSE=/tmp/eclipse/eclipse ./releng/scripts/check_code_cleanliness.sh"
exit 1
fi
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 $CDTDIR/$COREPROJECT/.settings/org.eclipse.jdt.core.prefs \
$PWD -data check_code_cleanliness_workspace
rm -rf check_code_cleanliness_workspace