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 test_detect_split_row_first() {
    let bad_code = r#""a:b:c" | split row ":" | first"#;
    RULE.assert_detects(bad_code);
}

#[test]
fn test_detect_split_row_first_with_1() {
    let bad_code = r#""path/to/file" | split row "/" | first 1"#;
    RULE.assert_detects(bad_code);
}