nu-lint 1.2.0

Linter for Nu shell scripts that helpfully suggests improvements
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use super::RULE;

#[test]
fn fix_simple_case() {
    let code = r#""key" in ($record | columns)"#;
    RULE.assert_fixed_contains(code, "$record has \"key\"");
}

#[test]
fn fix_with_variable_key() {
    let code = r#"$key in ($record | columns)"#;
    RULE.assert_fixed_contains(code, "$record has $key");
}