-
Notifications
You must be signed in to change notification settings - Fork 259
refactor(coverage): rename JavaSrcDirFinder to SrcDirFinder and add CLI options #2556
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
base: main
Are you sure you want to change the base?
Conversation
|
No issue mentions found. Please mention an issue in the pull request description. Use GitHub automation to close the issue when a PR is merged |
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.
Pull request overview
This PR refactors the Java source directory finder to be more generic, renaming it to SrcDirFinder and adding new CLI options for manually managing source search directories. The changes support multiple source directories and add warning capabilities when files are found in multiple locations.
Key changes:
- Renamed
JavaSrcDirFindertoSrcDirFinderandjava_src_dirstosrc_search_dirsfor more generic naming - Added
--add-src-dirand--remove-src-dirCLI options for manual directory management - Implemented warnings when files are found in multiple source directories (uses first match)
Reviewed changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| qlty-coverage/src/transformer.rs | Refactored PrependSrcDir::transform to detect and warn when files exist in multiple source directories |
| qlty-coverage/src/src_dir_finder.rs | Renamed struct from JavaSrcDirFinder to SrcDirFinder with updated test references |
| qlty-coverage/src/publish/settings.rs | Renamed field from java_src_dirs to src_search_dirs |
| qlty-coverage/src/publish/planner.rs | Updated to use src_search_dirs instead of java_src_dirs |
| qlty-coverage/src/lib.rs | Updated module and export names from java_src_dir_finder to src_dir_finder |
| qlty-cli/tests/cmd/coverage/discover_java_src_dirs.stderr | Updated test output from "Discovered Java source directories" to "Source search directories" |
| qlty-cli/src/commands/coverage/utils.rs | Updated output message and logic to display source search directories |
| qlty-cli/src/commands/coverage/publish.rs | Added --add-src-dir and --remove-src-dir CLI options with implementation logic and updated warning messages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Coverage Impact - macos-15 ⬇️ Merging this pull request will decrease total coverage on Code Coverage of Modified Files (5)
🛟 Help
|
|
Coverage Impact - ubuntu-latest ⬇️ Merging this pull request will decrease total coverage on Code Coverage of Modified Files (5)
🛟 Help
|
…LI options - Rename `java_src_dirs` to `src_search_dirs` in Settings - Rename `JavaSrcDirFinder` to `SrcDirFinder` (and rename file) - Update user-facing output from "Discovered Java source directories" to "Source search directories" - Add `--add-src-dir` CLI option to manually specify source directories (takes precedence over auto-discovered) - Add `--remove-src-dir` CLI option to exclude directories from the search list - Add warning when a file is found in multiple source directories 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
ca84460 to
d7f5c11
Compare
Summary
java_src_dirstosrc_search_dirsin Settings for more generic namingJavaSrcDirFindertoSrcDirFinder(including file rename)--add-src-dirCLI option to manually specify source directories (takes precedence over auto-discovered)--remove-src-dirCLI option to exclude directories from the search listTest plan
--add-src-diroption--remove-src-diroption--add-src-dirwith--discover-java-src-dirs🤖 Generated with Claude Code