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

fix(ai-slop): detect.sh --paths-file drops the last entry when the file has no trailing newline

Đang mở Phù hợp với người mới
#8,974 1 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

@kyle-sexton đang làm issue này rồi.

Từ ngày 23/10/2026.

  • #9356 của @kyle-sexton — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
86/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
bash
Lĩnh vực
cli

Hướng nghiên cứu

Đọc plugins/ai-slop/skills/audit/scripts/lib/resolve-targets.sh và xác định vòng lặp đọc --paths-file. Tái hiện sự cố bằng một tệp đường dẫn có mục cuối cùng không có ký tự xuống dòng ở cuối, rồi cập nhật vòng lặp như mô tả. Thêm một kiểm thử resolve-targets cho trường hợp đó và xác nhận đường dẫn cuối cùng được xử lý.

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

Mô tả

priority: low

plugins/ai-slop/skills/audit/scripts/lib/resolve-targets.sh reads --paths-file with while IFS= read -r line; do ... done. When the file's last line has no trailing newline, read returns nonzero after assigning that line, so the loop never processes it. A one-entry file then reports that it lists no paths and exits successfully, and a longer list silently omits its final file.

Reproduce, from a directory holding a.md and b.md:

printf 'a.md\nb.md' > list
bash plugins/ai-slop/skills/audit/scripts/detect.sh --list-targets --paths-file list   # lists a.md only
printf 'a.md\nb.md\n' > list2
bash plugins/ai-slop/skills/audit/scripts/detect.sh --list-targets --paths-file list2  # lists a.md and b.md

Fix: while IFS= read -r line || [[ -n $line ]]; do, with a resolve-targets test for a file with no trailing newline.

Found by Codex review on https://github.com/melodic-software/pr-pipeline-sandbox/pull/195 (a byte copy of this plugin). The pr-refine fix-docs lane is not affected, because it passes its targets in the prompt rather than through a paths file.

Ngôn ngữ chính
Shell
Star
22
Fork
2
Merge trung bình
6 giờ 58 phút
Pull request đã merge (30 ngày)
951

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 melodic-software/claude-code-plugins

Tất cả issue của melodic-software/claude-code-plugins

Issue tương tự

Thêm issue về Shell/Bash

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.