From 5fafebad33a481eeebab3548737a5b71acac4af6 Mon Sep 17 00:00:00 2001 From: alexion Date: Sat, 19 Sep 2026 23:47:54 -0400 Subject: [PATCH] fix(xatu): preserve bindings with unsupported values --- src/xatu/ast.rs | 1 + src/xatu/parser.rs | 2 +- src/xatu/testdata/lint_findings.nix | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xatu/ast.rs b/src/xatu/ast.rs index 84695ff..2627844 100644 --- a/src/xatu/ast.rs +++ b/src/xatu/ast.rs @@ -54,6 +54,7 @@ pub struct Ident { pub enum Expr { Ident(Ident), Select(Select), + Other, } #[derive(Debug, Clone, PartialEq, Eq)] diff --git a/src/xatu/parser.rs b/src/xatu/parser.rs index 9838d7a..ce9c94b 100644 --- a/src/xatu/parser.rs +++ b/src/xatu/parser.rs @@ -115,7 +115,7 @@ impl TryFrom for ast::Expr { match expr { rnix::ast::Expr::Ident(ident) => Ok(Self::Ident(ident.into())), rnix::ast::Expr::Select(select) => Ok(Self::Select(select.try_into()?)), - _ => Err(()), + _ => Ok(Self::Other), } } } diff --git a/src/xatu/testdata/lint_findings.nix b/src/xatu/testdata/lint_findings.nix index e225eea..de5a287 100644 --- a/src/xatu/testdata/lint_findings.nix +++ b/src/xatu/testdata/lint_findings.nix @@ -1,5 +1,5 @@ let - support = dependency; + support = "support"; primary = support; in { package = package;