-
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: 4.20
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 @@
## 4.20 #12425 +/- ##
=============================================
- Coverage 16.23% 4.03% -12.21%
=============================================
Files 5657 402 -5255
Lines 498996 32701 -466295
Branches 60566 5826 -54740
=============================================
- Hits 81011 1319 -79692
+ Misses 408951 31227 -377724
+ Partials 9034 155 -8879
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.
| 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?
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?