You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2026/07/12 21:48:15 UTC

[PR] ci(rat): enforce the ASF licence header on .gitignore files [magpie]

potiuk opened a new pull request, #847:
URL: https://github.com/apache/magpie/pull/847

   ## Why
   
   RAT already runs in CI, but it **was not scanning `.gitignore` files** — its
   `--input-exclude-parsed-scm GIT` reads the `.gitignore` files and self-excludes
   them, so the ASF headers stamped by the prek `add-license-headers` hook were
   not actually enforced. A future headerless `.gitignore` would slip through CI.
   
   ## What
   
   Add `--input-include '**/.gitignore'` to the RAT invocation in
   `.github/workflows/rat.yml`. `--input-include` overrides the SCM/std
   exclusions for exactly the tracked `.gitignore` files, so RAT scans them and
   requires an approved header.
   
   ## Verification (apache-rat 0.18, run locally)
   
   - With the flag: **+8** `.gitignore` files move into scope (`Standards`
     2292 → 2300), all **Approved**, `Unapproved: 0`.
   - Negative test: a `.gitignore` with no header is reported **Unapproved** and
     fails the check.
   - `.git/` stays excluded as a hidden dir; `.apache-magpie-overrides/.gitignore`
     stays excluded under its hidden dir (no behaviour change there).
   
   ## Depends on #846
   
   Stacked on #846 (which adds the headers + the prek stamper). This PR's diff
   currently includes those header commits; once #846 merges I'll rebase and the
   diff reduces to the one-line workflow change. **Merge #846 first** — RAT here
   would fail against a `main` whose `.gitignore` files still lack headers.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ci(rat): enforce the ASF licence header on .gitignore files [magpie]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #847:
URL: https://github.com/apache/magpie/pull/847


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ci(rat): enforce the ASF licence header on .gitignore files [magpie]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #847:
URL: https://github.com/apache/magpie/pull/847#issuecomment-4953536587

   (but it's not blocking the release I guess) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ci(rat): enforce the ASF licence header on .gitignore files [magpie]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #847:
URL: https://github.com/apache/magpie/pull/847#issuecomment-4953535825

   > a git ignore is is just a list of files aand as such is can't have copyright - I suggest no header is needed
   
   Yeah. Currently RAT will flag them - unfortunately - at least the RAT run in ATR - there are some flags that exclude those files. For next version I will just add them to .rat-excludes 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ci(rat): enforce the ASF licence header on .gitignore files [magpie]

Posted by "justinmclean (via GitHub)" <gi...@apache.org>.
justinmclean commented on PR #847:
URL: https://github.com/apache/magpie/pull/847#issuecomment-4953478605

   a git ignore is is just a list of files aand as such is can't have copyright - I suggest no header is needed


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ci(rat): enforce the ASF licence header on .gitignore files [magpie]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #847:
URL: https://github.com/apache/magpie/pull/847#issuecomment-4953616849

   Reversed in #849: dropped the headers and excluded `.gitignore` in `.rat-excludes` instead, per your point here that a git ignore file is just a list of files and needs no header. Thanks @justinmclean.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org