emmylua_code_analysis 0.22.0

A library for analyzing lua code.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[cfg(test)]
mod tests {
    use crate::{DiagnosticCode, VirtualWorkspace};

    #[test]
    fn test_global_in_non_module() {
        let mut ws = VirtualWorkspace::new();
        assert!(!ws.check_code_for(
            DiagnosticCode::GlobalInNonModule,
            r#"
            local function name()
                bbbb = 123
            end
        "#
        ));
    }
}