Expand description
Compiler-warning line writers for OffenderRecord batches.
Editor-friendly inline warnings: one offender per line, in the
conventional Clang/GCC and MSVC formats that editor quickfix parsers
(VS Code, IntelliJ, Vim) recognize out of the box. CI annotators do
not auto-recognize these formats: GitHub Actions surfaces them only
through a registered problem matcher, and other systems (GitLab,
Jenkins warnings-ng) need an equivalent parser configured. This is the
plain compiler-warning line; GitHub Actions’ own ::warning file=…::
workflow-command syntax is produced elsewhere, on the CLI annotation
path (big-code-analysis-cli/src/check_format.rs), not by these
writers.
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 15Both 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
offenderstowriter. - write_
msvc_ warning - Write MSVC-style warning lines for
offenderstowriter.