Skip to content

build(license): exclude .gitignore from RAT instead of stamping a header#849

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:build/exclude-gitignore-from-rat
Jul 13, 2026
Merged

build(license): exclude .gitignore from RAT instead of stamping a header#849
potiuk merged 1 commit into
apache:mainfrom
potiuk:build/exclude-gitignore-from-rat

Conversation

@potiuk

@potiuk potiuk commented Jul 13, 2026

Copy link
Copy Markdown
Member

Reverses #846 and #847. Instead of stamping the full ASF header into every tracked .gitignore and forcing RAT to scan them, this treats .gitignore as hash-comment config with no downstream licensing significance and excludes it from the RAT check — per @justinmclean's point on #847 that a .gitignore is just a list of files and needs no header.

  • Strip the ASF header from all 9 tracked .gitignore files.
  • .rat-excludes: add an explicit **/.gitignore + .gitignore exclusion (parsed-scm GIT self-excludes them too; the entry makes it explicit).
  • .github/workflows/rat.yml: drop --input-include '**/.gitignore', so the default exclusion holds again.
  • tools/dev/add-license-headers.py: revert to Markdown-only.
  • .pre-commit-config.yaml: hook files: back to \.md$.

…der (apache#846/apache#847 reversal)

Reverse the approach from apache#846/apache#847. Rather than stamping the full ASF
header into every tracked .gitignore and forcing RAT to scan them, treat
.gitignore as hash-comment config with no downstream licensing significance
and exclude it from the RAT check.

- Strip the ASF header from all 9 tracked .gitignore files.
- .rat-excludes: add an explicit **/.gitignore + .gitignore exclusion
  (parsed-scm GIT self-excludes them too; the entry makes it explicit).
- .github/workflows/rat.yml: drop `--input-include '**/.gitignore'`; the
  ignore files are no longer force-included, so the default exclusion holds.
- tools/dev/add-license-headers.py: revert to Markdown-only (drop
  ASF_HEADER_HASH, the .gitignore stamping branch, and .gitignore from
  --all's tracked targets).
- .pre-commit-config.yaml: hook `files:` back to `\.md$`, name/comment
  back to Markdown-only.
@potiuk potiuk merged commit 885663b into apache:main Jul 13, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant