diff --git a/pkgs/test/nixpkgs-check-by-name/src/nix_file.rs b/pkgs/test/nixpkgs-check-by-name/src/nix_file.rs
index 3e4f2668f3ea..e550f5c459f5 100644
--- a/pkgs/test/nixpkgs-check-by-name/src/nix_file.rs
+++ b/pkgs/test/nixpkgs-check-by-name/src/nix_file.rs
@@ -1,11 +1,11 @@
//! This is a utility module for interacting with the syntax of Nix files
-use rnix::SyntaxKind;
use crate::utils::LineIndex;
use anyhow::Context;
use rnix::ast;
use rnix::ast::Expr;
use rnix::ast::HasEntry;
+use rnix::SyntaxKind;
use rowan::ast::AstNode;
use rowan::TextSize;
use rowan::TokenAtOffset;
@@ -66,12 +66,14 @@ impl NixFile {
.with_context(|| format!("Could not read file {}", path.as_ref().display()))?;
let line_index = LineIndex::new(&contents);
- Ok(rnix::Root::parse(&contents).ok().map(|syntax_root| NixFile {
- parent_dir: parent_dir.to_path_buf(),
- path: path.as_ref().to_owned(),
- syntax_root,
- line_index,
- }))
+ Ok(rnix::Root::parse(&contents)
+ .ok()
+ .map(|syntax_root| NixFile {
+ parent_dir: parent_dir.to_path_buf(),
+ path: path.as_ref().to_owned(),
+ syntax_root,
+ line_index,
+ }))
}
}
@@ -110,18 +112,30 @@ impl NixFile {
///
/// Note that this also returns the same for `pythonPackages.callPackage`. It doesn't make an
/// attempt at distinguishing this.
- pub fn call_package_argument_info_at(&self, line: usize, column: usize, relative_to: &Path) -> anyhow::Result