Validate the `config` input before scanning

Đang mở
#24 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ó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
76/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ệ
github-actions, javascript
Lĩnh vực
ci-cd, tooling

Hướng nghiên cứu

Read src/action.js and src/config.js to trace how parsed config reaches analyze, then inspect test/config.test.js and the core CLI’s validation for parity. Add coverage for the listed invalid inputs and a valid config; done when invalid configs exit 2 with clear messages and the valid config remains unchanged. Run npm test -- test/config.test.js.

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

Mô tả

enhancement wave

Context

The action parses the config with JSON.parse and passes the result to analyze. An unknown key or an inverted range is accepted silently, unlike the core CLI, which validates it.

Scope

  • src/action.js
  • src/config.js
  • test/config.test.js

Acceptance criteria

  • Unknown keys, inverted ranges, non-integer bounds and unknown ignore ids exit 2 with a clear message.
  • The validation logic matches codepact-core and is covered by parity tests.
  • A valid config is unchanged.

Verification

npm test -- test/config.test.js

Complexity

Medium (3-4 hours)

Part of Stellar Wave. Comment to claim this issue before starting.

Ngôn ngữ chính
JavaScript
Star
0
Fork
0
Merge trung bình
7 giờ 28 phút
Pull request đã merge (30 ngày)
10

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 codepacct/codepact-action

Tất cả issue của codepacct/codepact-action

Issue tương tự

Thêm issue về JavaScript

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.