Skip to main content

Module warning_line

Module warning_line 

Source
Expand description

Compiler-warning line writers for OffenderRecord batches.

Editor- and CI-annotator-friendly inline warnings: one offender per line, in the conventional Clang/GCC and MSVC formats that quickfix parsers (VS Code, IntelliJ, Vim) and CI annotators (GitHub Actions ::warning::, GitLab, Jenkins warnings-ng) recognize out of the box.

Clang/GCC (write_clang_warning):

path/to/file.rs:42:5: warning: cyclomatic 17 exceeds limit 15 [big-code-analysis-cyclomatic]

MSVC (write_msvc_warning):

path\to\file.rs(42,5): warning : cyclomatic 17 exceeds limit 15

Both writers emit one line per offender. An empty offender slice produces empty output (zero bytes), not a blank line. Offenders whose path is not valid UTF-8 are skipped with a warning to stderr.

Functionsยง

write_clang_warning
Write Clang/GCC-style warning lines for offenders to writer.
write_msvc_warning
Write MSVC-style warning lines for offenders to writer.