[LTP] gitignore: ignore ltp-agent setup files

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Mon Jun 1 11:37:36 CEST 2026


Hi Andrea,

Thank you for the patch. Please find review comments below.

---

**Patch**: gitignore: ignore ltp-agent setup files
**Verdict**: Needs revision ✗

---

## Commit Message

The commit message is mostly well written. However, there is a
precision issue with the body:

> Directory entries are anchored to the repository root (leading '/') so
> they only match the ltp-agent-injected paths and cannot accidentally
> shadow any unrelated subdirectory with the same name in the future.

This is technically true for the three directory entries (/agents/,
/linter/, /skills/), but the same rationale applies equally to the
four file/hidden-directory entries (AGENTS.md, GEMINI.md, .agents,
.claude) which are NOT anchored. The justification for anchoring —
preventing accidental shadowing — applies to all seven entries, not
only the directory ones.

## Code Review

**File**: .gitignore

### Issue 1: Non-directory entries should also be anchored [Needs revision]

The three directory symlinks are correctly anchored:

    /agents/
    /linter/
    /skills/

But the remaining four entries are not:

    AGENTS.md
    GEMINI.md
    .agents
    .claude

In git's pattern language, a pattern without a leading `/` is matched
recursively throughout the entire working tree. So `AGENTS.md` would
silently ignore any file named AGENTS.md anywhere inside the
repository — including inside testcases/ or any other subdirectory a
future contributor might create.  Since all four of these are
exclusively injected at the repository root by ltp-agent, they should
be anchored with a leading `/` for the same reason the directory
entries are, and for consistency with them.

**Suggested fix** — replace the four non-anchored entries:

    -AGENTS.md
    -GEMINI.md
    -.agents
    -.claude
    +/AGENTS.md
    +/GEMINI.md
    +/.agents
    +/.claude

With this change the commit-message body can also be updated to say
"All entries are anchored to the repository root …" for accuracy.

---

LTP AI Reviewer


More information about the ltp mailing list