Skip to content

Conversation

@Pearl1594
Copy link
Contributor

@Pearl1594 Pearl1594 commented Jan 14, 2026

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
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 4.03%. Comparing base (5c1f931) to head (43345d4).

❗ There is a different number of reports uploaded between BASE (5c1f931) and HEAD (43345d4). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (5c1f931) HEAD (43345d4)
unittests 1 0
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     
Flag Coverage Δ
uitests 4.03% <ø> (ø)
unittests ?

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.

Copy link
Contributor

Copilot AI left a 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.

Comment on lines +22 to +24
branches: [ main, add-errorprone ]
pull_request:
branches: [ main, '4.20' ]
Copy link

Copilot AI Jan 15, 2026

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.
<fork>true</fork>
<meminitial>128m</meminitial>
<maxmem>512m</maxmem>
<encoding>UTF-8</encoding>
Copy link

Copilot AI Jan 15, 2026

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.
Copy link
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

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

clgtm

Copy link
Contributor

@DaanHoogland DaanHoogland left a 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?

Sign up for free to 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.

3 participants