Skip to content

Add support for errorprone 2.24.1 static analysis tool and Github Action to check for issues reported - #12425

Draft
Pearl1594 wants to merge 9 commits into
ghi11438-errorprone-fixesfrom
add-errorprone
Draft

Add support for errorprone 2.24.1 static analysis tool and Github Action to check for issues reported#12425
Pearl1594 wants to merge 9 commits into
ghi11438-errorprone-fixesfrom
add-errorprone

Conversation

@Pearl1594

@Pearl1594Pearl1594 commented Jan 14, 2026

Copy link
Copy Markdown
Contributor

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

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@codecov

codecovBot commented Jan 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 4.15%. Comparing base (45c3819) to head (0ea7f6a).

Additional details and impacted files
@@ Coverage Diff @@## ghi11438-errorprone-fixes #12425 +/- ##
==========================================================
Coverage 4.15% 4.15% ==========================================================
Files 404 404 Lines 32966 32966 Branches 5893 5893 ==========================================================
Hits 1370 1370 Misses 31420 31420 Partials 176 176 
FlagCoverage Δ
uitests4.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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.

FileDescription
pom.xmlAdded ErrorProne version property and configured maven-compiler-plugin with ErrorProne integration
.github/workflows/errorprone.ymlNew GitHub Actions workflow that runs ErrorProne static analysis in strict mode and fails on detected issues
.github/linters/codespell.txtAdded "errorprone" to the codespell ignore list to prevent false positives

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread.github/workflows/errorprone.yml Outdated
Comment on lines +22 to +24
branches: [ main, add-errorprone ]
pull_request:
branches: [ main, '4.20' ]

CopilotAIJan 15, 2026

Copy link

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.

Suggested change
branches: [ main, add-errorprone ]
pull_request:
branches: [ main, '4.20' ]
branches: [ main ]
pull_request:
branches: [ main ]

Copilot uses AI. Check for mistakes.
Comment threadpom.xml
<fork>true</fork>
<meminitial>128m</meminitial>
<maxmem>512m</maxmem>
<encoding>UTF-8</encoding>

CopilotAIJan 15, 2026

Copy link

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.

Suggested change
<encoding>UTF-8</encoding>

Copilot uses AI. Check for mistakes.

@vishesh92vishesh92 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@DaanHooglandDaanHoogland left a comment

Copy link
Copy Markdown
Contributor

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?

@DaanHoogland

Copy link
Copy Markdown
Contributor

@Pearl1594 , should we try to go for jdk17 instead of 11?

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@DaanHoogland

Copy link
Copy Markdown
Contributor

@Pearl1594 should we add this to the fixes?

@Pearl1594

Copy link
Copy Markdown
ContributorAuthor

I'd probably merge the fixes first, and then merge this.

@DaanHoogland

Copy link
Copy Markdown
Contributor

I'd probably merge the fixes first, and then merge this.

/me back to pretending to be patient

@weizhouapacheweizhouapache added this to the 4.24.0 milestone Jun 29, 2026
@DaanHooglandDaanHoogland linked an issue Aug 4, 2026 that may be closed by this pull request
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

errorprone cleanliness

5 participants

@Pearl1594@DaanHoogland@vishesh92@weizhouapache