No check enforces the two-line PURPOSE header position in source files #630
Labels
No labels
agent-ready
bug
contract
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-human
needs-input
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli#630
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during IW-622 (phase-01-context.md, Scope). No lint, scalafix rule, hook or test checks that a file starts with two
// PURPOSE:lines at lines 1-2. IW-622 and its sibling defects (a second PURPOSE line afterpackage, or only one PURPOSE line) went undetected for this reason. A repository-wide check in the lint gate would catch this class of defect.Intake: needs-input. Before this issue can be analysed, please answer these questions:
Which files must the check cover? The options are: (a) Scala files only (
*.scala,*.mill), or (b) also shell, BATS, frontend TS/CSS and Markdown docs. Markdown docs already use<!-- PURPOSE: -->headers at lines 1-2.Which Scala files are exempt? On origin/main (
bcb2d5b5), a check at lines 1-2 fails these files, and no open issue covers them:commands/*.scalashims. They have one PURPOSE line, anddocs/testing.mdlines 167-168 exempt them on purpose..iw/commands/test.scala, which has a PURPOSE line and then a// USAGE:line. This is the command-script header format.research/approach-3-hybrid/andresearch/approach-4-combined/.For each group, say: exempt, fix in this change, or delete (research/).
How does the check pass while #622, #628 and #629 are still open? These three issues cover the 25 failing
core/testfiles. The options are:#629 also asks whether to delete
DebugTest.scala. That decision changes the list of files for option (a).Let’s drop this for now