nu-lint 1.3.0

Linter for Nu shell scripts that helpfully suggests improvements
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::RULE;
use crate::log::init_test_log;

#[test]
fn if_block_with_spaces() {
    let good = "if true { echo 'yes' }";
    RULE.assert_ignores(good);
}

#[test]
fn ambiguous_record_or_block() {
    init_test_log();
    let good = r#"
        let env_record = {$name: $value}
        load-env $env_record
    "#;
    RULE.assert_ignores(good);
}