bug(scan): subdirectory scan target incorrectly includes root-level file checks #120

Open
opened 2026-06-03 12:52:12 +02:00 by michael · 0 comments
Owner

Problem

fragjan code <subdir> scans root-level files (LICENSE, .gitignore, etc.)
in addition to the specified subdirectory.

Example

fragjan code fs
[ERROR] LICENSE missing ISC License header
[ERROR] .gitignore missing build/ entry

These errors belong to the repo root, not to fs/. When a subdirectory is
given as scan target, only files within that directory should be checked.

Expected behavior

fragjan code fs scans only files under fs/. Root-level project checks
(LICENSE, .gitignore, README) should only run when scanning the project root
or with an explicit fragjan code . call.

Acceptance criteria

  • fragjan code <subdir> does not emit errors for files outside <subdir>
  • fragjan code . still runs full project checks
  • Test case added for subdirectory scan scope
## Problem `fragjan code <subdir>` scans root-level files (LICENSE, .gitignore, etc.) in addition to the specified subdirectory. ## Example ``` fragjan code fs [ERROR] LICENSE missing ISC License header [ERROR] .gitignore missing build/ entry ``` These errors belong to the repo root, not to `fs/`. When a subdirectory is given as scan target, only files within that directory should be checked. ## Expected behavior `fragjan code fs` scans only files under `fs/`. Root-level project checks (LICENSE, .gitignore, README) should only run when scanning the project root or with an explicit `fragjan code .` call. ## Acceptance criteria - [ ] `fragjan code <subdir>` does not emit errors for files outside `<subdir>` - [ ] `fragjan code .` still runs full project checks - [ ] Test case added for subdirectory scan scope
michael added this to the Basic Version milestone 2026-06-04 11:29:28 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/fragjan#120
No description provided.