Compiler flags in a command that compiles nothing earn nothing

Aberta
#576 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
76/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
cmake, python
Domínio
ci-cd, tooling

Direção de pesquisa

Start with facts/practices.py and trace how it reads CI text and identifies compiler flags. Check the two reported command shapes, then compare them with a real compile line using the same flags. Done means info-only commands and compile lines with only /dev/null or nonexistent inputs contribute no flags, while real compile lines still count.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Problem

Lines that compile nothing still feed the warnings, sanitizer and coverage checks:

  • cmake -Werror --version (CLI11) gives "warnings are treated as errors with -Werror". cmake isn't a tool run, so nothing makes the line inert.
  • g++ --coverage -fsanitize=address,undefined /dev/null (cxxopts) passes sanitizers, and g++ -Werror … /dev/null credits -Werror.

Expected

Info-only commands (--version, --help) and compile lines whose only inputs are /dev/null or files that don't exist are left out of the CI text that facts/practices.py reads for compiler flags.

Done when

Both shapes above earn nothing, and the same flags on a real compile line still count.

Split from #476. Checked against main at 4b4dbb6c on 2026-12-03: the cases above were reproduced with small fixtures or found in the code.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt

Linguagem predominante
Python
Estrelas
4
Forks
1
Merge médio
6h 31min
PRs com merge (30d)
238

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

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 cpp-best-practices/project_validator

Todas as issues de cpp-best-practices/project_validator

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

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