argument-comment-lint: subdir path breakage and duplicate unknown-lint warnings
Open 💬 0 comments Opened Mar 24, 2026 by rebroad
Summary
just argument-comment-lint has two UX/reliability issues:
- It can fail from subdirectories because the recipe uses a relative script path with
[no-cd]. - The prebuilt/source wrappers can emit repeated
unknown lint: uncommented_anonymous_literal_argumentwarnings due toDYLINT_RUSTFLAGSordering.
Repro
1) Subdirectory invocation failure
From inside codex-rs/:
just argument-comment-lint
Observed before fix:
./tools/argument-comment-lint/run-prebuilt-linter.sh: not found
2) Duplicate unknown-lint warnings during lint runs
Run:
just argument-comment-lint -p codex-state
Observed before fix:
- repeated warnings like:
unknown lint: uncommented_anonymous_literal_argument
Root Cause
justfilerecipe used./tools/...path while[no-cd]means path is resolved from caller CWD.- Wrapper sets
DYLINT_RUSTFLAGSwith-D uncommented-anonymous-literal-argumentbefore-A unknown_lints, so unknown-lint noise can surface before allow is effective.
Proposed Fix
- In
justfile, use absolute path via{{ justfile_directory() }}:
[no-cd]
argument-comment-lint *args:
"{{ justfile_directory() }}/tools/argument-comment-lint/run-prebuilt-linter.sh" "$@"
- In wrappers (
run-prebuilt-linter.sh,run.sh, and prebuilt launcher), ensure default/order is:
-A unknown_lints -D uncommented-anonymous-literal-argument
(and when appending to existing flags, append -A unknown_lints first, then -D ...)
Expected Outcome
just argument-comment-lintworks from repo root and fromcodex-rs/.- No duplicate unknown-lint warning noise during normal lint runs.