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

#[test]
fn ignore_to_json_before_jq() {
    RULE.assert_ignores("ls | to json | ^jq '.'");
}

#[test]
fn ignore_string_to_jq() {
    RULE.assert_ignores("'{\"a\": 1}' | ^jq '.a'");
}

#[test]
fn ignore_non_json_tool() {
    RULE.assert_ignores("ls | ^grep test");
}