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

Abierto
#689 1 comentario 0 reacciones 1 asignado Ver en GitHub

@MichaelRFairhurst ya está trabajando en esto.

Desde el 18/9/2024.

  • #688 de @MichaelRFairhurst — fusionado

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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
Lenguaje dominante
CodeQL
Estrellas
227
Forks
82
Merge medio
6 d 7 h
PR fusionados (30 d)
9

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de github/codeql-coding-standards

Todos los issues de github/codeql-coding-standards

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.