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

Aberta
#689 1 comentário 0 reações 1 responsável Ver no GitHub

@MichaelRFairhurst já está trabalhando nisso.

Desde 18/9/2024.

  • #688 de @MichaelRFairhurst — integrado

Avaliação

Esta issue ainda não foi avaliada.

Descrição

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
Linguagem predominante
CodeQL
Estrelas
227
Forks
82
Merge médio
6d 7h
PRs com merge (30d)
9

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de github/codeql-coding-standards

Todas as issues de github/codeql-coding-standards

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.