Skip to content

Commit

Permalink
chore(pre-commit): set up, fix trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
olantwin committed Feb 18, 2025
1 parent 32e6bc2 commit 8c01254
Show file tree
Hide file tree
Showing 31 changed files with 30 additions and 35 deletions.
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
ci:
autofix_prs: true
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# shipdist

[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ShipSoft/shipdist/main.svg)](https://results.pre-commit.ci/latest/github/ShipSoft/shipdist/main)

Recipes to build `FairShip` and it's dependencies using `aliBuild`

## General information
Expand Down
2 changes: 0 additions & 2 deletions asiofi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,3 @@ prepend-path LD_LIBRARY_PATH \$ASIOFI_ROOT/lib
EoF
MODULEDIR="$INSTALLROOT/etc/modulefiles"
mkdir -p $MODULEDIR && rsync -a --delete etc/modulefiles/ $MODULEDIR


1 change: 0 additions & 1 deletion bz2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ system_requirement: ".*"
system_requirement_check: |
printf "#include <bzlib.h>\n" | gcc -xc++ - -c -o /dev/null
---

2 changes: 1 addition & 1 deletion clhep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ tag: CLHEP_2_2_0_8
#!/bin/sh
cmake $SOURCEDIR \
-DCMAKE_INSTALL_PREFIX:PATH="$INSTALLROOT"

make ${JOBS+-j $JOBS}
make install
2 changes: 1 addition & 1 deletion configuration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ proc ModulesHelp { } {
set version $PKGVERSION-@@PKGREVISION@$PKGHASH@@
module-whatis "ALICE Modulefile for $PKGNAME $PKGVERSION-@@PKGREVISION@$PKGHASH@@"
# Dependencies
module load BASE/1.0 ${BOOST_VERSION:+boost/$BOOST_VERSION-$BOOST_REVISION} ${GCC_TOOLCHAIN_ROOT:+GCC-Toolchain/$GCC_TOOLCHAIN_VERSION-$GCC_TOOLCHAIN_REVISION} protobuf/$PROTOBUF_VERSION-$PROTOBUF_REVISION grpc/$GRPC_VERSION-$GRPC_REVISION
module load BASE/1.0 ${BOOST_VERSION:+boost/$BOOST_VERSION-$BOOST_REVISION} ${GCC_TOOLCHAIN_ROOT:+GCC-Toolchain/$GCC_TOOLCHAIN_VERSION-$GCC_TOOLCHAIN_REVISION} protobuf/$PROTOBUF_VERSION-$PROTOBUF_REVISION grpc/$GRPC_VERSION-$GRPC_REVISION
# Our environment
setenv Configuration_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
prepend-path PATH \$::env(Configuration_ROOT)/bin
Expand Down
4 changes: 2 additions & 2 deletions defaults-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ overrides:
true
log4cpp:
tag: 1b9f8f7c031d6947c7468d54bc1da4b2f414558d
prefer_system_check: |
prefer_system_check: |
ls $LOG4CPP_ROOT/include/ > /dev/null && \
ls $LOG4CPP_ROOT/lib/ > /dev/null && \
true
Expand Down Expand Up @@ -253,7 +253,7 @@ overrides:
ls $LHAPDF5_ROOT/lib/libLHAPDF.la > /dev/null && \
ls $LHAPDF5_ROOT/lib/libLHAPDF.a > /dev/null && \
ls $LHAPDF5_ROOT/lib64/python2.7/site-packages/lhapdf.py > /dev/null && \
ls $LHAPDF5_ROOT/share/lhapdf > /dev/null
ls $LHAPDF5_ROOT/share/lhapdf > /dev/null
XercesC:
prefer_system_check: |
ls $XERCESC_ROOT/ > /dev/null && \
Expand Down
4 changes: 2 additions & 2 deletions evtgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export HEPMCLOCATION="$HEPMC_ROOT"

rsync -a $SOURCEDIR/* .

./configure --hepmcdir=$HEPMC_ROOT --pythiadir=$PYTHIA_ROOT --tauoladir=$TAUOLAPP_ROOT --photosdir=$PHOTOSPP_ROOT --prefix=$INSTALLROOT CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS"
./configure --hepmcdir=$HEPMC_ROOT --pythiadir=$PYTHIA_ROOT --tauoladir=$TAUOLAPP_ROOT --photosdir=$PHOTOSPP_ROOT --prefix=$INSTALLROOT CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS"

Check notice on line 19 in evtgen.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Double quote to prevent globbing and word splitting. [SC2086]

Check notice on line 19 in evtgen.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Double quote to prevent globbing and word splitting. [SC2086]

Check notice on line 19 in evtgen.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Double quote to prevent globbing and word splitting. [SC2086]

Check notice on line 19 in evtgen.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Double quote to prevent globbing and word splitting. [SC2086]

Check notice on line 19 in evtgen.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Double quote to prevent globbing and word splitting. [SC2086]

make
make
make install

# Modulefile
Expand Down
1 change: 0 additions & 1 deletion fairlogger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ prepend-path ROOT_INCLUDE_PATH \$FAIRLOGGER_ROOT/include
EoF
MODULEDIR="$INSTALLROOT/etc/modulefiles"
mkdir -p $MODULEDIR && rsync -a --delete etc/modulefiles/ $MODULEDIR

1 change: 0 additions & 1 deletion fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ module load BASE/1.0 ${GCC_TOOLCHAIN_REVISION:+GCC-Toolchain/$GCC_TOOLCHAIN_VERS
set FMT_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
prepend-path ROOT_INCLUDE_PATH \$FMT_ROOT/include
EoF

2 changes: 1 addition & 1 deletion g4py.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cmake $INSTALLROOT \
${BOOST_VERSION:+-DBoost_NO_SYSTEM_PATH=TRUE}\
-DXERCESC_ROOT_DIR=${XERCESC_ROOT} \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DBoost_NO_BOOST_CMAKE=TRUE
-DBoost_NO_BOOST_CMAKE=TRUE

make ${JOBS:+-j $JOBS}
make install
Expand Down
4 changes: 2 additions & 2 deletions genie.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ $BUILDDIR/configure --prefix=$INSTALLROOT \
--with-log4cpp-inc=$LOG4CPP_ROOT/include/ \
--with-log4cpp-lib=$LOG4CPP_ROOT/lib/ \
--with-apfel-inc=$APFEL_ROOT/include/ \
--with-apfel-lib=$APFEL_ROOT/lib/
--with-apfel-lib=$APFEL_ROOT/lib/

Check notice on line 45 in genie.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Double quote to prevent globbing and word splitting. [SC2086]


make CXXFLAGS="-Wall $CXXFLAGS" CFLAGS="-Wall $CFLAGS"
Expand Down Expand Up @@ -86,5 +86,5 @@ prepend-path LD_LIBRARY_PATH \$::env(GENIE_ROOT)/genie/lib
prepend-path ROOT_INCLUDE_PATH \$::env(GENIE_ROOT)/genie/inc
prepend-path ROOT_INCLUDE_PATH \$::env(GENIE_ROOT)/genie/src
$([[ ${ARCHITECTURE:0:3} == osx ]] && echo "prepend-path DYLD_LIBRARY_PATH \$::env(GENIE_ROOT)/lib")
append-path PATH \$::env(GENIE_ROOT)/genie/bin
append-path PATH \$::env(GENIE_ROOT)/genie/bin
EoF
1 change: 0 additions & 1 deletion go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,3 @@ module load BASE/1.0
setenv GOROOT \$::env(BASEDIR)/$PKGNAME/\$version
prepend-path PATH \$::env(GOROOT)/bin
EoF

2 changes: 1 addition & 1 deletion gsoap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rsync -a --exclude='**/.git' --delete --delete-excluded \
$SOURCEDIR/ ./

# On mac we use openssl coming from homebrew.
case $ARCHITECTURE in
case $ARCHITECTURE in
osx*)
[ ! "X$OPENSSL_ROOT" = X ] || OPENSSL_ROOT=`brew --prefix openssl`
;;
Expand Down
1 change: 0 additions & 1 deletion lcov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ setenv LCOV_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
prepend-path LD_LIBRARY_PATH \$::env(LCOV_ROOT)/lib
$([[ ${ARCHITECTURE:0:3} == osx ]] && echo "prepend-path DYLD_LIBRARY_PATH \$::env(LCOV_ROOT)/lib")
EoF

1 change: 0 additions & 1 deletion libperl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ system_requirement: ".*"
system_requirement_check: |
printf "#include <EXTERN.h>\nint main(){}\n" | cc -xc -lperl -L`perl -MConfig -e 'print $Config{archlib}'`/CORE -I`perl -MConfig -e 'print $Config{archlib}'`/CORE - -o /dev/null && perl -MExtUtils::Embed -e 1
---

1 change: 0 additions & 1 deletion make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ system_requirement: ".*"
system_requirement_check: |
type make
---

2 changes: 1 addition & 1 deletion messagepack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cmake $SOURCEDIR -DCMAKE_INSTALL_PREFIX:PATH="${INSTALLROOT}" \
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
-DMSGPACK_CXX11=ON \
-DGTEST_DIR=$GOOGLETEST_ROOT \
-DGTEST_ROOT=$GOOGLETEST_ROOT
-DGTEST_ROOT=$GOOGLETEST_ROOT

Check notice on line 15 in messagepack.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Double quote to prevent globbing and word splitting. [SC2086]

make ${JOBS+-j $JOBS}
make test
Expand Down
2 changes: 1 addition & 1 deletion monitoring.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ proc ModulesHelp { } {
set version $PKGVERSION-@@PKGREVISION@$PKGHASH@@
module-whatis "ALICE Modulefile for $PKGNAME $PKGVERSION-@@PKGREVISION@$PKGHASH@@"
# Dependencies
module load BASE/1.0 ${BOOST_VERSION:+boost/$BOOST_VERSION-$BOOST_REVISION} ${APMON_CPP_VERSION:+ApMon-CPP/$APMON_CPP_VERSION-$APMON_CPP_REVISION} ${GCC_TOOLCHAIN_ROOT:+GCC-Toolchain/$GCC_TOOLCHAIN_VERSION-$GCC_TOOLCHAIN_REVISION} protobuf/$PROTOBUF_VERSION-$PROTOBUF_REVISION grpc/$GRPC_VERSION-$GRPC_REVISION Configuration/$CONFIGURATION_VERSION-$CONFIGURATION_REVISION
module load BASE/1.0 ${BOOST_VERSION:+boost/$BOOST_VERSION-$BOOST_REVISION} ${APMON_CPP_VERSION:+ApMon-CPP/$APMON_CPP_VERSION-$APMON_CPP_REVISION} ${GCC_TOOLCHAIN_ROOT:+GCC-Toolchain/$GCC_TOOLCHAIN_VERSION-$GCC_TOOLCHAIN_REVISION} protobuf/$PROTOBUF_VERSION-$PROTOBUF_REVISION grpc/$GRPC_VERSION-$GRPC_REVISION Configuration/$CONFIGURATION_VERSION-$CONFIGURATION_REVISION
# Our environment
setenv Monitoring_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
Expand Down
1 change: 0 additions & 1 deletion opengl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ system_requirement_check: |
printf "#include <GL/glu.h>\n" | cc -xc - -c -o /dev/null
fi
---

4 changes: 2 additions & 2 deletions openssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ build_requires:
rsync -av --delete --exclude="**/.git" $SOURCEDIR/ .
case ${PKG_VERSION} in
v1.1*)
v1.1*)
OPTS=""
OPENSSLDIRPREFIX="" ;;
*)
*)
OPTS="no-krb5"
OPENSSLDIRPREFIX="etc/ssl"
;;
Expand Down
1 change: 0 additions & 1 deletion perl-modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,3 @@ for x in $PACKAGES; do
echo "Getting $x from CPAN"
cpan -j MyConfig.pm $x
done
1 change: 0 additions & 1 deletion pythia6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ prepend-path LD_LIBRARY_PATH \$::env(PYTHIA6_ROOT)/lib
prepend-path AGILE_GEN_PATH \$::env(PYTHIA6_ROOT)
$([[ ${ARCHITECTURE:0:3} == osx ]] && echo "prepend-path DYLD_LIBRARY_PATH \$::env(PYTHIA6_ROOT)/lib")
EoF

2 changes: 1 addition & 1 deletion rapidjson.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tag: v1.1.0
#!/bin/sh

cmake $SOURCEDIR \
-DCMAKE_INSTALL_PREFIX=$INSTALLROOT
-DCMAKE_INSTALL_PREFIX=$INSTALLROOT

Check notice on line 11 in rapidjson.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Double quote to prevent globbing and word splitting. [SC2086]

make ${JOBS:+-j$JOBS} install

Expand Down
2 changes: 1 addition & 1 deletion sas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ requires:
cmake $SOURCEDIR \
-DCMAKE_INSTALL_PREFIX:PATH="$INSTALLROOT" \
-DLLVM_DEV_DIR=$CLANG_ROOT

make ${JOBS+-j $JOBS}
make install
2 changes: 1 addition & 1 deletion tauolapp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rsync -a $SOURCEDIR/* .

./configure --with-hepmc=$HEPMC_ROOT --with-lhapdf=$LHAPDF_ROOT --with-pythia8=$PYTHIA_ROOT --prefix=$INSTALLROOT CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS"

make
make
make install

# Modulefile
Expand Down
1 change: 0 additions & 1 deletion termcap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ system_requirement: ".*"
system_requirement_check: |
printf "#include <termcap.h>\n" | gcc -xc++ - -c -o /dev/null
---

1 change: 0 additions & 1 deletion xdevel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ system_requirement: ".*"
system_requirement_check: |
printf "#include <X11/Xlib.h>\n#include <X11/xpm.h>\n#include <X11/Xft/Xft.h>\n#include <X11/extensions/Xext.h>\n" | cc -xc - -I/opt/X11/include $(freetype-config --cflags 2> /dev/null || pkg-config freetype2 --cflags 2> /dev/null) -c -o /dev/null
---

2 changes: 1 addition & 1 deletion xercesc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
#!/bin/sh
cd $SOURCEDIR
autoreconf -i
cd -
cd -

Check warning on line 14 in xercesc.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Use 'cd ... || exit' or 'cd ... || return' in case cd fails. [SC2164]

Check notice on line 14 in xercesc.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Use a ( subshell ) to avoid having to cd back. [SC2103]
echo "command $SOURCEDIR configure --prefix $INSTALLROOT CFLAGS $CFLAGS CXXFLAGS=$CFLAGS"
$SOURCEDIR/configure --prefix=$INSTALLROOT CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS"
make ${JOBS+-j $JOBS}
Expand Down
2 changes: 0 additions & 2 deletions yacc-like.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ system_requirement: ".*"
system_requirement_check: |
which bison && which flex
---


1 change: 0 additions & 1 deletion yaml-cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,3 @@ module load BASE/1.0 ${BOOST_REVISION:+boost/$BOOST_VERSION-$BOOST_REVISION}
set YAMLCPP \$::env(BASEDIR)/$PKGNAME/\$version
prepend-path LD_LIBRARY_PATH \$YAMLCPP/lib
EoF

0 comments on commit 8c01254

Please sign in to comment.