Skip to content

Conversation

@brynary
Copy link
Member

@brynary brynary commented Dec 5, 2025

Summary

  • Rename java_src_dirs to src_search_dirs in Settings for more generic naming
  • Rename JavaSrcDirFinder to SrcDirFinder (including file rename)
  • 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

Test plan

  • All existing tests pass (230 unit tests + 12 integration tests)
  • Manual test with --add-src-dir option
  • Manual test with --remove-src-dir option
  • Manual test combining --add-src-dir with --discover-java-src-dirs

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings December 5, 2025 20:18
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

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

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 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 JavaSrcDirFinder to SrcDirFinder and java_src_dirs to src_search_dirs for more generic naming
  • Added --add-src-dir and --remove-src-dir CLI 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.

@qltysh
Copy link
Contributor

qltysh bot commented Dec 5, 2025

Coverage Impact - macos-15

⬇️ Merging this pull request will decrease total coverage on main by 0.01%.

Code Coverage of Modified Files (5)

RatingFile% DiffUncovered Line #s
Coverage rating: C Coverage rating: C
qlty-cli/src/commands/coverage/publish.rs52.9%272-277, 340, 342
Coverage rating: B Coverage rating: B
qlty-coverage/src/publish/planner.rs100.0%
Coverage rating: A Coverage rating: A
qlty-coverage/src/transformer.rs95.5%323, 325
Coverage rating: B Coverage rating: B
qlty-cli/src/commands/coverage/utils.rs100.0%
New file Coverage rating: A
qlty-coverage/src/src_dir_finder.rs100.0%
Total91.5%
🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@qltysh
Copy link
Contributor

qltysh bot commented Dec 5, 2025

Coverage Impact - ubuntu-latest

⬇️ Merging this pull request will decrease total coverage on main by 0.01%.

Code Coverage of Modified Files (5)

RatingFile% DiffUncovered Line #s
Coverage rating: C Coverage rating: C
qlty-cli/src/commands/coverage/publish.rs52.9%272-277, 340, 342
Coverage rating: B Coverage rating: B
qlty-coverage/src/publish/planner.rs100.0%
Coverage rating: A Coverage rating: A
qlty-coverage/src/transformer.rs95.5%323, 325
Coverage rating: B Coverage rating: B
qlty-cli/src/commands/coverage/utils.rs100.0%
New file Coverage rating: A
qlty-coverage/src/src_dir_finder.rs100.0%
Total91.5%
🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

…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]>
@brynary brynary force-pushed the refactor/rename-java-src-dir-finder branch from ca84460 to d7f5c11 Compare December 5, 2025 20:25
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