Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[correctness][documentation-ambiguity][printf documentation and help] printf help advertises the explicitly unsupported -v option

Đang mở Phù hợp với người mới
#665 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
75/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
cli, documentation

Hướng nghiên cứu

Dòng usage nằm trong builtins/printf/printf.go quanh dòng 189, ngay cạnh đoạn mã từ chối -v. Hãy kiểm tra SHELL_FEATURES.md quanh dòng 42 để xác nhận -v không được hỗ trợ. Xóa phần [-v var] khỏi nội dung usage, và thêm một kịch bản trong tests/scenarios/cmd/help/ chạy help printf rồi kiểm tra rằng -v không xuất hiện. Hoàn thành khi kịch bản này đạt và đầu ra trợ giúp không còn quảng bá -v nữa.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Generated by the rshell behavior correctness scanner.

  • Contract: BEH-009
  • Classification: documentation-ambiguity
  • Impact: low
  • Target: printf documentation and help
  • Scanned commit: 514d1cb8188fda6b1accca5955dfab3b0e8aa34a

help printf prints a usage line advertising [-v var], while SHELL_FEATURES.md explicitly rejects -v. This directs users toward an unsupported invocation. The temporary scenario checks a usage line with that option removed; the finding is a documentation conflict, not a claim that one exact help layout is mandatory.

Contract sources
  • [SHELL_FEATURES.md:42](https://github.com/datadog/rshell/blob/514d1cb8188fda6b1accca5955dfab3b0e8aa34a/SHELL_FEATURES.md#L42): Supported surface; Bash/GNU behavior applies where no intentional divergence is documented.
  • [builtins/printf/printf.go:189](https://github.com/datadog/rshell/blob/514d1cb8188fda6b1accca5955dfab3b0e8aa34a/builtins/printf/printf.go#L189): User-visible help advertises printf [-v var] format [arguments].
Implementation references
  • [builtins/printf/printf.go:189](https://github.com/datadog/rshell/blob/514d1cb8188fda6b1accca5955dfab3b0e8aa34a/builtins/printf/printf.go#L189): --help emits Bash usage including -v, immediately beside code rejecting -v.

Fixture setup

Use a fresh empty working directory for each run. Build from /workspace/repo first. No fixture files are needed. Run the CLI and reference commands with that directory as cwd.

Reproducer

help printf

Commands used:

  • GOENV_VERSION=1.26.3 timeout 300s go build -o /tmp/zz_correctness_scan_rshell ./cmd/rshell
  • /tmp/zz_correctness_scan_rshell --allow-all-commands --allowed-paths "$PWD" -c 'help printf '
  • GOENV_VERSION=1.26.3 timeout 300s go test ./tests -run '^TestShellScenarios$/^.$/zz_correctness_scan_printf_help_surface$' -count=2 -v -timeout 300s

Verification

  • Reproduction runs: 4
  • Reference: Two fresh CLI runs and two scenario runs captured identical help text. Expected help must exclude unsupported -v; exact replacement wording is unspecified. Bash is not an oracle for this intentional -v divergence.
  • Temporary test: tests/scenarios/zz_correctness_scan_printf_help_surface.yaml (removed after evidence capture)
  • Suggested regression-test location: tests/scenarios/cmd/help/

Fingerprint: 1ab3bb5a33aa40ef0898b7a9a899e5cc56a73e99c9886bb4b2bac144c7ea6f0d

Ngôn ngữ chính
Go
Star
31
Fork
3
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
14

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DataDog/rshell

Tất cả issue của DataDog/rshell

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.