1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Scan `.nix` files for dead code (unused variable bindings).
//!
//! ```
//! let content = "
//! let
//! foo = {};
//! inherit (foo) bar baz;
//! in baz
//! ";
//! let ast = rnix::Root::parse(content);
//! assert_eq!(0, ast.errors().len());
//!
//! let results = deadnix::Settings {
//! no_lambda_arg: false,
//! no_lambda_pattern_names: false,
//! no_underscore: false,
//! warn_used_underscore: false,
//! }.find_dead_code(&ast.syntax());
//!
//! for dead_code in &results {
//! println!("unused binding: {}", dead_code.binding.name);
//! }
//! ```
pub use Binding;
pub use ;
pub use edit_dead_code;
pub use Scope;