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

オープン
#689 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

@MichaelRFairhurst がすでに取り組んでいます。

2024年9月18日 から。

  • #688 @MichaelRFairhurst による — マージ済み

評価

この issue はまだ評価されていません。

説明

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
主要言語
CodeQL
スター
227
フォーク
82
平均マージ
6日 7時間
マージ済み PR(30日)
9

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/codeql-coding-standards のほかの issue

github/codeql-coding-standards の issue をすべて見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。