nu-lint 1.3.1

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
use super::RULE;

#[test]
fn fix_if_block() {
    let input = "if true {echo 'yes'}";
    let expected = "if true { echo 'yes' }";
    RULE.assert_fixed_is(input, expected);
}

#[test]
fn fix_closure_without_params() {
    let input = "do {print 'hi'}";
    let expected = "do { print 'hi' }";
    RULE.assert_fixed_is(input, expected);
}