Recognise `#[cfg_attr(..., contracterror)]`

Đang mở
#39 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
1-3 giờ
Mức phù hợp với người mới
78/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ệ
javascript
Lĩnh vực
backend

Hướng nghiên cứu

Start with the attribute scanner in src/parse.js and the cases in test/parse.test.js. Run npm test -- test/parse.test.js, then add coverage for conditional contracterror, unrelated attributes, and nested condition parentheses. Done means the tests confirm only cfg_attr containing contracterror is recognised.

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

Mô tả

analysis wave

Context

A crate can apply contracterror conditionally with cfg_attr. The current scanner ignores the attribute, so every variant in that enum is invisible to every rule.

Scope

  • src/parse.js
  • test/parse.test.js

Acceptance criteria

  • #[cfg_attr(feature = "errors", contracterror)] is recognised.
  • #[cfg_attr(test, something_else)] is not mistaken for a contract error.
  • Nested parentheses in the condition are handled.

Verification

npm test -- test/parse.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
2
Merge trung bình
1 ngày 1 giờ
Pull request đã merge (30 ngày)
12

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-core

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

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.