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
18
#[cfg(test)]
mod test {
    use crate::{DiagnosticCode, VirtualWorkspace};

    #[test]
    fn test_disable_nextline() {
        let mut ws = VirtualWorkspace::new();

        assert!(ws.check_code_for(
            DiagnosticCode::SyntaxError,
            r#"
        ---@diagnostic disable-next-line: syntax-error
        ---@param
        local function f() end
        "#,
        ));
    }
}