`A2-7-3`: documented type alias to template instantiation considered undocumented

Đang mở
#709 2 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cpp
Lĩnh vực
devtools

Hướng nghiên cứu

Kiểm tra UndocumentedUserDefinedType.ql và tái hiện báo cáo bằng ví dụ C++ về bí danh kiểu và template được cung cấp trong AUTOSAR A2-7-3. Truy vết lý do bí danh đã được lập tài liệu tới template_type bị báo cáo, sau đó xác minh rằng truy vấn không còn báo cáo a2_7_3_fp_alias nhưng vẫn phát hiện các kiểu do người dùng định nghĩa thực sự chưa được lập tài liệu.

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

Mô tả

Difficulty-Medium false positive/false negative Impact-Low Standard-AUTOSAR user-report
Affected rules
  • A2-7-3
Description

A documented type alias where type-id is a template results in a missing documentation false positive. If the rhs of the (documented) alias declaration does not involve a template, then there is no alert.

Example

/// @brief Template type template_type description.
///
/// @tparam template parameter T.
template<typename T> struct template_type {};

/// @brief Alias to int a_documented_alias.
using a_documented_alias = int;

/// @brief Alias a2_7_3_fp_alias to instantiated template_type with int template parameter.
using a2_7_3_fp_alias = template_type<int>;

Running query UndocumentedUserDefinedType.ql, AUTOSAR A2-7-3, will evaluate to

| declaration of a2_7_3_fp_alias | Declaration entry for user-defined type a2_7_3_fp_alias is missing documentation. |
Ngôn ngữ chính
CodeQL
Star
227
Fork
82
Merge trung bình
6 ngày 7 giờ
Pull request đã merge (30 ngày)
9

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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 github/codeql-coding-standards

Tất cả issue của github/codeql-coding-standards

Issue tương tự

Thêm issue về DevTools

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.