`RULE-10-4`: False negatives as rule does not currently consider ternaries
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Kiểm tra MisraExpressions.qll, bắt đầu với OperationWithUsualArithmeticConversions và truy vấn hoặc các bài kiểm thử RULE-10-4. Xác nhận cách các phép toán số học nhị phân và phép toán số học gán cung cấp các toán hạng, sau đó làm cho trường hợp biểu thức điều kiện bao phủ các toán hạng 2 và 3, đồng thời xác minh rằng ví dụ ba ngôi được cung cấp không còn là false negative.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Affected rules
RULE-10-4
Description
The text states that the rule applies to usual arithmetic conversions, and the c spec states that for a ? b : c the usual arithmetic conversions are performed on operands b and c. However, OperationWithUsualArithmeticConversions from MisraExpressions.qll holds for this instanceof BinaryOperation and ... or this instanceof AssignArithmeticOperation, it should also hold for this instanceof ConditionalExpr and getLeftOperand() / getRightOperand() should return operands 2 & 3.
Example
void example_function() {
int x;
float y;
bool b;
b ? x : y; // FALSE NEGATIVE
}
- 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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/codeql-coding-standards
-
false positive/false negative Stardard-MISRA-C++
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/codeql-coding-standards#1172 ·
-
Difficulty-Medium false positive/false negative false-positive Impact-Medium Standard-CERT-C
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
github/codeql-coding-standards#1200 ·
-
`RULE-0-0-1`: "unreachable statement" false positives due to over-pruning of the control-flow graph Đang mởfalse positive/false negative
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
github/codeql-coding-standards#1190 ·
-
false positive/false negative
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
github/codeql-coding-standards#1175 ·
-
false positive/false negative Stardard-MISRA-C++
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
github/codeql-coding-standards#1165 ·
Tất cả issue của github/codeql-coding-standards
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
danielmiessler/LifeOS#2218 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
hemilabs/ui-monorepo#2332 ·
-
Help-Wanted Needs-Triage Package-Update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/winget-pkgs#438662 ·
-
priority: p3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
googleapis/librarian#7636 ·