Skip to content

Conversation

@vic
Copy link
Owner

@vic vic commented Jun 26, 2025

No description provided.

Copilot AI review requested due to automatic review settings June 26, 2025 00:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the recursive file listing function to safely handle file paths (rather than only directories) and adds a corresponding test to ensure that passing a file path doesn’t break the import-tree logic.

  • listFilesRecursive now checks for directories and returns files unchanged
  • A new test case verifies behavior when given a file path instead of a directory

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
default.nix Enhanced listFilesRecursive to detect directory vs. file inputs
checkmate.nix Added test case for import-tree behavior when input is a file
Comments suppressed due to low confidence (1)

checkmate.nix:142

  • This test invokes lit.leafs instead of the import-tree function, so it doesn’t actually exercise the new file-path branch. Consider calling the import-tree entrypoint to verify that passing a file path returns the correct singleton list.
          expr = lit.leafs ./tree/x/y.nix;

vic and others added 3 commits June 26, 2025 00:07
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@vic vic merged commit 4ce0367 into main Jun 26, 2025
1 check passed
@vic vic deleted the vic/jj-change-kmmwwlqrwxxu branch June 26, 2025 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants