fix(rules): skip content checks when file is missing #92

Closed
opened 2026-05-27 14:02:17 +02:00 by michael · 1 comment
Owner

Problem

When LICENSE file is missing, fragjan still runs content checks against it
(ISC header, copyright, edit notes, etc.) and reports errors for each.

Content checks on a missing file are meaningless and misleading.
If the exists-check for LICENSE fails, all subsequent content checks
for that file must be skipped.

This was fixed before and has regressed.

Expected behaviour

  • LICENSE missing -> single error: "LICENSE missing in project root"
  • No content checks run against a missing file

See also

## Problem When LICENSE file is missing, fragjan still runs content checks against it (ISC header, copyright, edit notes, etc.) and reports errors for each. Content checks on a missing file are meaningless and misleading. If the exists-check for LICENSE fails, all subsequent content checks for that file must be skipped. This was fixed before and has regressed. ## Expected behaviour - LICENSE missing -> single error: "LICENSE missing in project root" - No content checks run against a missing file ## See also - DAW/fragjan#73 (exists primitive -- related area)
Author
Owner

Fixed implicitly as part of DAW/fragjan#43 refactor.

When fs.read_file() fails (file missing or unreadable), the runner
now produces a [SKIP] result instead of continuing with empty content.
This prevents misleading content check errors against missing files.

Implemented in core/runner/project.lua and core/runner/file.lua.

Fixed implicitly as part of DAW/fragjan#43 refactor. When fs.read_file() fails (file missing or unreadable), the runner now produces a [SKIP] result instead of continuing with empty content. This prevents misleading content check errors against missing files. Implemented in core/runner/project.lua and core/runner/file.lua.
michael 2026-05-30 15:57:02 +02:00
michael added this to the Basic Version milestone 2026-05-30 16:04:44 +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#92
No description provided.