nu-lint 1.1.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
use super::RULE;

#[test]
fn fix_short_flag_to_long() {
    RULE.assert_fixed_is("ls -a", "ls --all");
}

#[test]
fn fix_short_flag_ls_long() {
    RULE.assert_fixed_is("ls -l", "ls --long");
}

#[test]
fn fix_short_flag_with_value() {
    RULE.assert_fixed_contains("str replace -r 'a' 'b'", "--regex");
}