-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add support for errorprone 2.24.1 static analysis tool and Github Action to check for issues reported #12425
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: ghi11438-errorprone-fixes
Are you sure you want to change the base?
Conversation
…ion to check for issues reported
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## ghi11438-errorprone-fixes #12425 +/- ##
==========================================================
Coverage 4.15% 4.15%
==========================================================
Files 403 403
Lines 32902 32902
Branches 5881 5881
==========================================================
Hits 1366 1366
Misses 31361 31361
Partials 175 175
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 integrates ErrorProne 2.24.1, a Java static analysis tool that inspects code's abstract syntax tree at compile time to detect common bug patterns and API misuses. The PR configures ErrorProne in the Maven build process and adds a GitHub Actions workflow to validate the codebase against ErrorProne checks.
Changes:
- Added ErrorProne 2.24.1 as a compiler plugin with warnings mode
- Created a GitHub Actions workflow to run ErrorProne analysis in strict mode
- Updated codespell dictionary to exclude "errorprone" as a typo
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pom.xml | Added ErrorProne version property and configured maven-compiler-plugin with ErrorProne integration |
| .github/workflows/errorprone.yml | New GitHub Actions workflow that runs ErrorProne static analysis in strict mode and fails on detected issues |
| .github/linters/codespell.txt | Added "errorprone" to the codespell ignore list to prevent false positives |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/errorprone.yml
Outdated
| branches: [ main, add-errorprone ] | ||
| pull_request: | ||
| branches: [ main, '4.20' ] |
Copilot
AI
Jan 15, 2026
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 workflow includes temporary test branches ('add-errorprone' and '4.20') that should be removed before merging to main. According to the PR description, these were added temporarily to test the workflow.
| branches: [ main, add-errorprone ] | |
| pull_request: | |
| branches: [ main, '4.20' ] | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] |
| <fork>true</fork> | ||
| <meminitial>128m</meminitial> | ||
| <maxmem>512m</maxmem> | ||
| <encoding>UTF-8</encoding> |
Copilot
AI
Jan 15, 2026
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 encoding configuration was added explicitly, which is good practice. However, this duplicates the project-level property 'project.build.sourceEncoding' already set to UTF-8 at line 50. While not harmful, it's redundant since Maven uses the project property by default.
| <encoding>UTF-8</encoding> |
vishesh92
left a comment
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.
clgtm
DaanHoogland
left a comment
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.
looks good, but won’t we get a 0% pass-rate this way?
…/cloudstack into add-errorprone
Description
This PR adds the ErrorProne java static analysis tool that inspects the code's abstract syntax tree at compile time and report common bug patterns and API misuses.
Issues reported by this tool have been addressed in a separate PR: #12419
NOTE: Temporarily added branch: add-errorprone and 4.20 to push and pull request branches respectively to see this github action run.
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?