You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by cm...@apache.org on 2023/10/16 18:03:17 UTC
[trafficserver] branch master updated: Add rat target (#10614)
This is an automated email from the ASF dual-hosted git repository.
cmcfarlen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 8be51230ed Add rat target (#10614)
8be51230ed is described below
commit 8be51230ed6df71e125c70b17e853ab3c4266909
Author: Chris McFarlen <ch...@mcfarlen.us>
AuthorDate: Mon Oct 16 13:03:12 2023 -0500
Add rat target (#10614)
---
CMakeLists.txt | 6 ++++++
ci/rat-regex.txt | 2 ++
2 files changed, 8 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f73b3f1c5..b17f9455e8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -610,6 +610,12 @@ if(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git AND NOT EXISTS ${CMAKE_SOURCE_DIR}/.git
configure_file(${CMAKE_SOURCE_DIR}/tools/git/pre-commit ${CMAKE_SOURCE_DIR}/.git/hooks/pre-commit COPYONLY)
endif()
+# Add a target to run the rat tool. If java isn't installed this will fail, but its not normally run
+add_custom_target(rat
+ COMMENT "Running Apache RAT"
+ COMMAND java -jar ${CMAKE_SOURCE_DIR}/ci/apache-rat-0.13-SNAPSHOT.jar -E ${CMAKE_SOURCE_DIR}/ci/rat-regex.txt -d ${CMAKE_SOURCE_DIR}
+)
+
# Create an empty directories for ATS runtime
install(DIRECTORY DESTINATION var/log/trafficserver)
install(DIRECTORY DESTINATION var/trafficserver)
diff --git a/ci/rat-regex.txt b/ci/rat-regex.txt
index 83c7189229..01b75babc6 100644
--- a/ci/rat-regex.txt
+++ b/ci/rat-regex.txt
@@ -70,3 +70,5 @@ port\.h
^swoc$
^tests/gold_tests/autest-site/min_cfg$
^clang-tidy.conf$
+^build.*$
+^cmake-build.*$