Report `#[contracterror]` on a non-enum item

Đang mở
#40 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
68/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
tooling

Hướng nghiên cứu

Start with src/parse.js and src/analyze.js to trace how #[contracterror] attributes and item kinds are handled, then read the related cases in test/parse.test.js and test/analyze.test.js. Add an error finding for the attribute on a non-enum item, including its kind and line, and document the rule in docs/RULES.md. Run npm test -- test/analyze.test.js and confirm attributed enums remain unaffected.

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

Mô tả

analysis wave

Context

The attribute only makes sense on an enum. When it is placed on a struct or union, the parser skips it and the mistake is silent.

Scope

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

Acceptance criteria

  • A new attribute-misplaced finding names the item kind and the line.
  • The finding is an error.
  • An enum with the attribute is unaffected.
  • The rule is documented in docs/RULES.md.

Verification

npm test -- test/analyze.test.js

Complexity

Medium (3 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.