feat(natu): ignore imported let bindings
This commit was merged in pull request #122.
This commit is contained in:
@@ -199,6 +199,24 @@ in
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[gtest]
|
||||
fn natu_accepts_single_use_import_binding() -> googletest::Result<()> {
|
||||
let report = natu::future_sight(vec![SourceFile {
|
||||
path: PathBuf::from("testdata/import_binding.nix"),
|
||||
source: r#"
|
||||
let
|
||||
imported = import ./module.nix { };
|
||||
in
|
||||
imported
|
||||
"#
|
||||
.into(),
|
||||
}])
|
||||
.or_fail()?;
|
||||
|
||||
expect_that!(report.is_clean(), is_true());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[gtest]
|
||||
fn natu_reports_single_use_binding() -> googletest::Result<()> {
|
||||
let report = natu::future_sight(vec![SourceFile {
|
||||
|
||||
Reference in New Issue
Block a user