Skip to content

Conversation

@seanbudd
Copy link
Member

@seanbudd seanbudd commented Oct 8, 2025

Passing in an invalid path leads validation to unexpectedly pass.
This is because when globbing the path, no files are found, meaning validation occurs against no files.
This can be quite misleading for developers, as it is unclear why passing in what seems like a proper file path with validation errors yields no validation errors. See nvaccess/addon-datastore#6712 for context

@seanbudd seanbudd requested a review from Copilot October 8, 2025 05:34
Copy link

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 adds validation to prevent silent failures when invalid file paths are provided to the validation script. Previously, passing an invalid path would cause validation to unexpectedly pass because no files would be found to validate against.

  • Added error checking to raise a ValueError when no files match the provided glob pattern
  • Updated workflow test paths to use correct file locations

Reviewed Changes

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

File Description
_validate/validate.py Added validation to raise ValueError when no files are found matching the glob pattern
.github/workflows/testCode.yaml Updated file paths in workflow commands to use correct test data locations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@seanbudd seanbudd merged commit 0df7b32 into main Oct 8, 2025
2 checks passed
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