Skip to content

argument-comment-lint: subdir path breakage and duplicate unknown-lint warnings #15686

@rebroad

Description

@rebroad

Summary

just argument-comment-lint has two UX/reliability issues:

  1. It can fail from subdirectories because the recipe uses a relative script path with [no-cd].
  2. The prebuilt/source wrappers can emit repeated unknown lint: uncommented_anonymous_literal_argument warnings due to DYLINT_RUSTFLAGS ordering.

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

  1. justfile recipe used ./tools/... path while [no-cd] means path is resolved from caller CWD.
  2. Wrapper sets DYLINT_RUSTFLAGS with -D uncommented-anonymous-literal-argument before -A unknown_lints, so unknown-lint noise can surface before allow is effective.

Proposed Fix

  1. In justfile, use absolute path via {{ justfile_directory() }}:
[no-cd]
argument-comment-lint *args:
    "{{ justfile_directory() }}/tools/argument-comment-lint/run-prebuilt-linter.sh" "$@"
  1. 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-lint works from repo root and from codex-rs/.
  • No duplicate unknown-lint warning noise during normal lint runs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentIssues related to the core agent loopbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions