diff options
author | Akshay <[email protected]> | 2022-02-20 05:25:20 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2022-02-20 05:31:36 +0000 |
commit | c7874ec26d6499a1196ce23432beb33764490dec (patch) | |
tree | 226b8dce61e5f7580be9de7ebde72212bb94f682 /bin/tests/data/useless_has_attr.nix | |
parent | e8130a90dca048d195603281f72e1af0b4f7ccc6 (diff) |
new lint: useless_has_attr
Diffstat (limited to 'bin/tests/data/useless_has_attr.nix')
-rw-r--r-- | bin/tests/data/useless_has_attr.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/tests/data/useless_has_attr.nix b/bin/tests/data/useless_has_attr.nix new file mode 100644 index 0000000..f4c9fd5 --- /dev/null +++ b/bin/tests/data/useless_has_attr.nix | |||
@@ -0,0 +1,9 @@ | |||
1 | [ | ||
2 | # trivial | ||
3 | (if x ? a then x.a else default) | ||
4 | (if x.a ? b then x.a.b else default) | ||
5 | (if x ? a.b then x.a.b else default) | ||
6 | |||
7 | # complex body | ||
8 | (if x ? a then x.a else if b then c else d) | ||
9 | ] | ||