`A1-1-2`: does not understand -Wno-* flags

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

@MichaelRFairhurst đang làm issue này rồi.

Từ ngày 18/9/2024.

  • #688 của @MichaelRFairhurst — đã merge

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Difficulty-Low false positive/false negative Impact-Medium Standard-AUTOSAR
Affected rules
  • A1-1-2
Description

This rule looks for compilations with no warning flags. However, it will falsely detect -Wno-* flags as if they are warning flags.

Notably, gcc is often built with -Wformat enabled by default. This can be suppressed with -Wno-format, which would cause the false negative.

Note the same issue exists with -w which suppresses all -W* flags, which is failing linux/gcc tests, and I created https://github.com/github/codeql-coding-standards/pull/688 to fix. However, this issue is, philosophically, one step further yet than that PR in terms of altering current behavior.

Example
g++ -Wno-format test.cpp
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

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.