You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by sb...@apache.org on 2026/10/22 13:13:39 UTC
(tooling-trusted-releases) 01/01: Remove RAT excludes that ignore bin, core, and tags directories
This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch sbp
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
commit 66264b22e730ee40c937fb0b838020ce46f8655e
Author: Sean B. Palmer <se...@miscoranda.com>
AuthorDate: Wed Oct 21 19:36:36 2026 +0100
Remove RAT excludes that ignore bin, core, and tags directories
---
atr/docs/license-checks.md | 15 +++++++++++----
atr/tasks/checks/rat.py | 4 +---
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/atr/docs/license-checks.md b/atr/docs/license-checks.md
index 44622f5e..a4a1dd3e 100644
--- a/atr/docs/license-checks.md
+++ b/atr/docs/license-checks.md
@@ -43,17 +43,24 @@ The Apache RAT (Release Audit Tool) scans every file in the archive.
### Standard exclusions
-If you don't provide a custom exclusion file, RAT uses a default config that excludes:
+Every RAT run excludes editor and operating system leftovers and hidden directories (RAT's `MISC`, `MAC` and `HIDDEN_DIR` collections):
-* Standard SCM directories (like `.git`, `.svn`)
-* IDE configuration files
+* `**/*~`, `**/#*#`, `**/.#*`, `**/%*%` and `**/._*`
+* `**/.DS_Store`
+* any directory whose name starts with `.`, such as `.git`, `.github` or `.idea`
+
+If the archive does not contain a `.rat-excludes` file, RAT also excludes Maven, IntelliJ IDEA and Git files (RAT's `MAVEN`, `IDEA` and `GIT` collections), even when your exclusions come from the RAT excludes URL or the RAT source excludes in your project policy:
+
+* `**/target/**`, `**/.mvn/**`, `**/MANIFEST.MF`, `**/release.properties`, `**/pom.xml.releaseBackup`, `**/build.log`, `**/cobertura.ser` and `**/.repository`
+* `**/*.iml`, `**/*.ipr`, `**/*.iws` and `**/.idea/**`
+* `**/.git/**` and `**/.gitignore`
### Custom exclusions
You can define your own exclusions by adding a `.rat-excludes` file to the archive.
> [!IMPORTANT]
-> If a `.rat-excludes` file exists, the **standard exclusions are ignored**.
+> If a `.rat-excludes` file exists, the Maven, IntelliJ IDEA and Git exclusions are not applied, but the other standard exclusions and the generated file patterns still are.
**Scan root behavior**: You can only have one `.rat-excludes` file. The folder it's in becomes the
**scan root**.
diff --git a/atr/tasks/checks/rat.py b/atr/tasks/checks/rat.py
index c04453fd..4741eb62 100644
--- a/atr/tasks/checks/rat.py
+++ b/atr/tasks/checks/rat.py
@@ -70,17 +70,15 @@ _STD_EXCLUSIONS_ALWAYS: Final[list[str]] = ["MISC", "HIDDEN_DIR", "MAC"]
# Additional exclusions when no project exclusion file is found
_STD_EXCLUSIONS_EXTENDED: Final[list[str]] = [
"MAVEN",
- "ECLIPSE",
"IDEA",
"GIT",
- "STANDARD_SCMS",
]
# Release policy fields which this check relies on - used for result caching
INPUT_POLICY_KEYS: Final[list[str]] = ["license_check_mode", "source_excludes_rat"]
# The resolver fetches the configured .rat-excludes URL and returns a hash of its contents, so a
# change to the fetched file busts the cached result even though the URL string is unchanged
INPUT_EXTRA_ARGS: Final[list[str]] = ["rat_excludes_hash", "rat_jar_name"]
-CHECK_VERSION: Final[str] = "7"
+CHECK_VERSION: Final[str] = "8"
class RatError(RuntimeError):
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org