luaur-analyze-cli 0.1.0

Standalone Luau type-checker CLI (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::enums::report_format::ReportFormat;
use crate::functions::report::report;
use luaur_config::records::lint_warning::LintWarning;

/// C++ `static void reportWarning(ReportFormat format, const char* name, const LintWarning& warning)`
/// (`CLI/src/Analyze.cpp:86-89`).
pub fn report_warning(format: ReportFormat, name: &str, warning: &LintWarning) {
    report(
        format,
        name,
        &warning.location,
        LintWarning::get_name(warning.code),
        &warning.text,
    );
}