luaur_analyze_cli/functions/report_warning.rs
1use crate::enums::report_format::ReportFormat;
2use crate::functions::report::report;
3use luaur_config::records::lint_warning::LintWarning;
4
5/// C++ `static void reportWarning(ReportFormat format, const char* name, const LintWarning& warning)`
6/// (`CLI/src/Analyze.cpp:86-89`).
7pub fn report_warning(format: ReportFormat, name: &str, warning: &LintWarning) {
8 report(
9 format,
10 name,
11 &warning.location,
12 LintWarning::get_name(warning.code),
13 &warning.text,
14 );
15}