NullAway icon indicating copy to clipboard operation
NullAway copied to clipboard

Update README with Kotlin Gradle DSL example

Open sdelamo opened this issue 1 month ago • 5 comments

This pull-request modifies the README.md file to provide an example of the necessary Gradle configuration with the Kotlin DSL (the default DSL)

Summary by CodeRabbit

  • Documentation
    • Added a Kotlin DSL Gradle example showing Error Prone and NullAway configuration (paralleling the existing Groovy DSL).
    • Included explanatory text covering plugin/dependency setup and per-task Error Prone options, with guidance on disabling NullAway for test code.

✏️ Tip: You can customize this high-level summary in your review settings.

sdelamo avatar Nov 20 '25 16:11 sdelamo

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: msridhar
:x: sdelamo
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Nov 20 '25 16:11 CLAassistant

Walkthrough

A Kotlin DSL Gradle snippet was added to the README demonstrating configuration of Error Prone and NullAway in build.gradle.kts. The snippet shows applying plugins, declaring dependencies, and configuring per-task errorprone options, including a conditional that disables NullAway for test compilation. Explanatory text was added linking this Kotlin DSL example to the existing Groovy DSL example. No executable code or public API declarations were changed.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a Kotlin Gradle DSL example to the README, which aligns with the documented purpose of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e6f380028a7cba40d9fdcd568625db30b460cb2 and 1f31b8985e83781e93b41a18473d11cf16f7e628.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-14T18:50:06.159Z
Learnt from: msridhar
Repo: uber/NullAway PR: 1245
File: guava-recent-unit-tests/src/test/java/com/uber/nullaway/guava/NullAwayGuavaParametricNullnessTests.java:101-102
Timestamp: 2025-08-14T18:50:06.159Z
Learning: In NullAway JSpecify tests, when JDK version requirements exist due to bytecode annotation reading capabilities, prefer failing tests over skipping them on unsupported versions to ensure CI catches regressions and enforces proper JDK version usage for developers.

Applied to files:

  • README.md
🪛 markdownlint-cli2 (0.18.1)
README.md

51-51: Trailing spaces Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)

🔇 Additional comments (1)
README.md (1)

68-78: Verify that the Kotlin conditional structure is semantically equivalent to the Groovy example.

The Kotlin DSL example places the conditional if (name.lowercase().contains("test")) inside the options.errorprone block, whereas the Groovy example has it outside the first options.errorprone block and then reconfigures with a new options.errorprone block inside the conditional. While the Kotlin structure may work due to lambda scope, please verify that this produces the intended behavior (disabling NullAway for test tasks) and matches the Groovy semantics, or clarify in a comment if the Kotlin approach is intentionally idiomatic and functionally equivalent.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Nov 20 '25 16:11 coderabbitai[bot]

@sdelamo have you signed the CLA? We'll need that signature before we can merge this.

msridhar avatar Nov 24 '25 23:11 msridhar

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 88.39%. Comparing base (88df9d1) to head (a1582d8).

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1347   +/-   ##
=========================================
  Coverage     88.39%   88.39%           
  Complexity     2592     2592           
=========================================
  Files            97       97           
  Lines          8702     8702           
  Branches       1732     1732           
=========================================
  Hits           7692     7692           
  Misses          505      505           
  Partials        505      505           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Nov 24 '25 23:11 codecov[bot]

@sdelamo any update on the CLA?

msridhar avatar Dec 02 '25 21:12 msridhar