Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions dev/.rat-excludes
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.github/*
.rat-excludes
build
.git
.gitignore
.github/**
dev/.rat-excludes
uv.lock
mkdocs/*
notebooks/*
.ruff_cache/**
.pytest_cache/**
.mypy_cache/**
mkdocs/**
notebooks/**
Comment on lines +1 to +8
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/* -> .github/**, new syntax to ignore all files in this folder
.rat-excludes -> dev/.rat-excludes, most specifically exclude this file
build folder is not longer produced
.git & .gitignore are covered by the GIT standard collection
adding some cache in python env .ruff_cache, .pytest_cache, .mypy_cache
mkdocs/* & notebooks/* using the new syntax to exclude this folder mkdocs/** & notebooks/**

26 changes: 9 additions & 17 deletions dev/check-license
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ else
declare java_cmd=java
fi

export RAT_VERSION=0.16.1
export RAT_VERSION=0.17
export rat_jar="$FWDIR"/lib/apache-rat-${RAT_VERSION}.jar
mkdir -p "$FWDIR"/lib

Expand All @@ -67,20 +67,12 @@ mkdir -p "$FWDIR"/lib
exit 1
}

mkdir -p build
$java_cmd -jar "$rat_jar" --scan-hidden-directories -E "$FWDIR"/dev/.rat-excludes -d "$FWDIR" > build/rat-results.txt
$java_cmd -jar "$rat_jar" \
--input-exclude-file "$FWDIR"/dev/.rat-excludes \
--input-exclude-std GIT IDEA MAC \
--input-include-std HIDDEN_DIR \
--output-style missing-headers \
--log-level ERROR \
-- "$FWDIR" || exit 1

if [ $? -ne 0 ]; then
echo "RAT exited abnormally"
exit 1
fi

ERRORS="$(cat build/rat-results.txt | grep -e "??")"

if test ! -z "$ERRORS"; then
echo "Could not find Apache license headers in the following files:"
echo "$ERRORS"
exit 1
else
echo -e "RAT checks passed."
fi
echo "RAT checks passed."