Skip to content

Feature Request Issue 125: Analyze test classes optionally if the user wants to #126

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

Merged
merged 9 commits into from
Feb 19, 2025

Conversation

rahlk
Copy link
Collaborator

@rahlk rahlk commented Feb 19, 2025

Motivation and Context

Currently, the tool ignores test classes when analyzing Java projects built with Maven and Gradle. This omission leads to incomplete analysis, as test classes often contain important dependencies, call sites, and code interactions that should be considered.

This PR adds support for detecting and processing test classes from:

  • Maven projects (src/test/java/, compiled to target/test-classes/)
  • Gradle projects (src/test/java/, compiled to build/classes/java/test/)

How Has This Been Tested?

  • Manually verified that test classes are correctly recognized in Maven and Gradle projects.
  • Checked that test class handling does not interfere with main class analysis.
  • Since this is an enhancement to the processing pipeline rather than a functional feature, no new test cases are required.

Breaking Changes

Types of Changes

Checklist

  • I have read the Codellm-Devkit Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional Context

  • Codeanalyzer now adds a new flag --include-test-classes which forces the application to be built by compiling test classes. To enable this feature, you are to use that flag.

Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
…llable.

Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
…llable.

Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
…nUnit to capture package information.

Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
…nUnit to capture package information.

Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
…nUnit to capture package information.

Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
Signed-off-by: Rahul Krishna <i.m.ralk@gmail.com>
@rahlk rahlk linked an issue Feb 19, 2025 that may be closed by this pull request
@rahlk rahlk requested review from sinha108 and rangeetpan February 19, 2025 21:32
@rahlk rahlk changed the title 125 analyze test classes optionally if the user wants to Feature Request 125: Analyze test classes optionally if the user wants to Feb 19, 2025
@rahlk rahlk changed the title Feature Request 125: Analyze test classes optionally if the user wants to Feature Request Issue 125: Analyze test classes optionally if the user wants to Feb 19, 2025
@rahlk rahlk added enhancement New feature or request kind/feature Feature refactoring Refactoring labels Feb 19, 2025
@rahlk rahlk merged commit 6cb594b into main Feb 19, 2025
@rahlk rahlk deleted the 125-analyze-test-classes-optionally-if-the-user-wants-to branch February 19, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request kind/feature Feature refactoring Refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Analyze test classes optionally if the user wants to
2 participants