-
Notifications
You must be signed in to change notification settings - Fork 0
⚡ Bolt: [Refactor] Centralize path operations in filesystem module #416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,3 @@ | ||||||||
| fn test() { | ||||||||
| println!("test"); | ||||||||
| } | ||||||||
|
Comment on lines
+1
to
+3
|
||||||||
| fn test() { | |
| println!("test"); | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Stray test_helpers.rs file committed at repo root violates project structure
A new file test_helpers.rs has been added at the repository root. This file contains only a trivial unused function (fn test() { println!("test"); }) and is not referenced by any module or build configuration. According to AGENTS.md and CLAUDE.md, Rust unit/integration tests must be located in the tests/ directory, not the repo root. There is already a proper tests/test_helpers.rs module used by multiple integration tests. This appears to be an accidentally committed file.
Prompt for agents
Delete the stray file test_helpers.rs from the repository root. It serves no purpose, is not referenced by any code, and violates the project structure guidelines (tests belong in tests/ directory). The proper test helper module already exists at tests/test_helpers.rs.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Search for any calls to the `test` function in the codebase.
# Search for invocations of the test() function
rg -nP '\btest\s*\(' --type rust -C3Repository: WebFirstLanguage/wfl
Length of output: 2538
🏁 Script executed:
find . -name "test_helpers.rs" -type fRepository: WebFirstLanguage/wfl
Length of output: 105
🏁 Script executed:
echo "=== Root level test_helpers.rs ===" && cat ./test_helpers.rs && echo -e "\n=== Tests directory test_helpers.rs ===" && cat ./tests/test_helpers.rsRepository: WebFirstLanguage/wfl
Length of output: 10942
Remove the unused test() function—this file should not be at the repository root.
This file at the root level is dead code that serves no purpose. The function contains only a println! statement with no actual test logic or utility functionality. Per the project guidelines, test files should be placed in the tests/ directory with feature-oriented naming (e.g., file_io_test.rs).
Additionally:
- The function is never invoked anywhere in the codebase.
- It lacks a
#[test]attribute and proper test assertions. - If intended as a helper module, it provides no actual utilities (see the legitimate
tests/test_helpers.rsfor reference).
Delete this file before merging.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@test_helpers.rs` around lines 1 - 3, Delete the unused top-level file and its
dead function: remove the file containing fn test() { println!("test"); } (the
unused symbol "test") from the repository root; do not replace it—if helper
logic is needed move real helpers into tests/test_helpers.rs with proper #[test]
functions and assertions and feature-oriented naming instead of keeping this
file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc comment for
unary_path_string_opsays the operation is&Path -> Result<Arc<str>, RuntimeError>and mentions it may return an error, but the function signature doesn’t allow the closure to returnResultor propagate errors. Update the docs to match the current API, or change the helper to acceptFnOnce(&Path) -> Result<impl Into<Arc<str>>, RuntimeError>and propagate the error.