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

Feature Request: Annotate nullability

Đang mở
#32 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
api

Hướng nghiên cứu

Start with HidSharp/Platform/Linux/LinuxHidDevice.cs around lines 120-124 and inspect the HidDevice API properties that expose strings or other nullable values. Compare the issue's two annotation options against the project's target framework and existing API conventions. Done means the public API clearly communicates which values can return null, consistently across the relevant devices and platforms.

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

Mô tả

enhancement

As a consumer, it can be a bit unclear knowing what can return null.

If I set my IDE to pessimistic null analysis, I get potential null reference warnings in many locations, such as all string properties for HidDevice, even for properties that seemingly cannot return null:

https://github.com/OpenTabletDriver/HIDSharpCore/blob/944a386ea6d51480ccd7dde7bb78e78768da8e1d/HidSharp/Platform/Linux/LinuxHidDevice.cs#L120-L124

It would be helpful to annotate this in the API, either using C#'s own #nullable feature, or by using JetBrains Annotations.

Ngôn ngữ chính
C#
Star
13
Fork
16
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 OpenTabletDriver/HIDSharpCore

Tất cả issue của OpenTabletDriver/HIDSharpCore

Issue tương tự

Thêm issue về C#

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.