Skip to content
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

Add support to load onlyAnalyze classes/packages from specified file. #635

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

Rahul-khandelwal
Copy link

Use Case

When adding spotbugs to a large project, no every file can be fixed at once. In the gradual process of fixing all files, onlyAnalyze is a good tool to include selected files at very beginning of analysis.

Current implementation of parsing onlyAnalyze can't read classes/packages from file.

Having all classes/packages in pom.xml introduces a lot of boiler plate into pom file.

So it makes sense to have onlyAnalyze support for reading classes/packages from file(s).

Changes

Add support to load onlyAnalyze classes/packages from specified file.

Excluded txt files for licensing.

@Rahul-khandelwal
Copy link
Author

@hazendaz I am not able to test negative scenario in my implementation. Every time newly introduced test onlyAnalyzeFileSource completed successfully. It would be great if you can point me to how to verify or if I am missing something.

@hazendaz
Copy link
Member

@Rahul-khandelwal Approved to run, will have to look at later, most likely this would be introduced sometime after spotbugs 4.8.0 is released.

@hazendaz hazendaz self-assigned this Sep 25, 2023
@Rahul-khandelwal
Copy link
Author

Sure @hazendaz , Please have a look when possible. Also let me know if I am missing something in testing.
It looks like all checks have passed except for 3 which failed while setting up JDK-21 ea, looks to be some unrelated issue.
I am marking the PR ready for review as well.

@Rahul-khandelwal Rahul-khandelwal marked this pull request as ready for review September 26, 2023 11:55
@hazendaz hazendaz changed the base branch from spotbugs to master September 30, 2023 20:18
@hazendaz
Copy link
Member

note: switched to master branch as target. Moving entire repo back to 'master'. The original split was due to upstream repo but its since retired and points here. So rather than have a one-off in spotbugs or for that matter in most repos, moving back to 'master'. Thanks.

@hazendaz hazendaz merged commit a7cb4b0 into spotbugs:master Nov 7, 2023
15 of 18 checks passed
@hazendaz
Copy link
Member

hazendaz commented Nov 7, 2023

Thanks @Rahul-khandelwal .

@Rahul-khandelwal
Copy link
Author

@hazendaz Thanks for merging. could you tell me any tentative dates for next release starting when I can use this feature?

@hazendaz
Copy link
Member

hazendaz commented Nov 7, 2023 via email

@hazendaz
Copy link
Member

hazendaz commented Nov 8, 2023

Released in 4.8.0.0 and 4.8.1.0

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.

3 participants