Skip to content

Conversation

@sdelamo
Copy link

@sdelamo sdelamo commented Nov 20, 2025

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.

@CLAassistant
Copy link

CLAassistant commented Nov 20, 2025

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.

✅ msridhar
❌ sdelamo
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 20, 2025

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 9e6f380 and 1f31b89.

📒 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 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 fdec09a and ea6e7f5.

📒 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)


72-72: Trailing spaces
Expected: 0 or 2; Actual: 8

(MD009, no-trailing-spaces)


73-73: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)


79-79: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


79-79: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

}
```

or to `build.gradle.kts` if you use the [Kotlin Gradle DSL](https://docs.gradle.org/current/userguide/kotlin_dsl.html):
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove trailing spaces and add blank line after code fence.

Markdown linting issues detected:

  • Line 51: 1 trailing space
  • Line 72: 8 trailing spaces
  • Line 79: Missing blank line after closing code fence

Apply this diff to fix formatting:

-or to `build.gradle.kts` if you use the [Kotlin Gradle DSL](https://docs.gradle.org/current/userguide/kotlin_dsl.html): 
+or to `build.gradle.kts` if you use the [Kotlin Gradle DSL](https://docs.gradle.org/current/userguide/kotlin_dsl.html):

For line 72, remove the 8 trailing spaces within the code block, and add a blank line after line 79:

         option("NullAway:AnnotatedPackages", "com.uber")
-        
+
         // Disable NullAway on test code
 }



Also applies to: 72-72, 79-79

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.18.1)</summary>

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

(MD009, no-trailing-spaces)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

In README.md around lines 51, 72 and 79: remove the single trailing space at
line 51, remove the 8 trailing spaces inside the code block at line 72, and add
one blank line immediately after the closing code fence at line 79 so there is
an empty line following the code block; save the file and re-run markdown
linting to confirm the trailing spaces are gone and the blank line after the
code fence is present.


</details>

<!-- This is an auto-generated comment by CodeRabbit -->

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (3)
README.md (3)

51-51: Remove trailing space.

Line 51 has 1 trailing space after the colon, which violates markdown linting rules.

-or to `build.gradle.kts` if you use the [Kotlin Gradle DSL](https://docs.gradle.org/current/userguide/kotlin_dsl.html): 
+or to `build.gradle.kts` if you use the [Kotlin Gradle DSL](https://docs.gradle.org/current/userguide/kotlin_dsl.html):

72-72: Remove trailing spaces inside code block.

Line 72 contains 8 trailing spaces on a blank line within the code block, which violates markdown linting rules.

         option("NullAway:AnnotatedPackages", "com.uber")
-        
+
         // Disable NullAway on test code

79-80: Add blank line after code fence.

The closing code fence at line 79 should be followed by a blank line to comply with markdown linting rules (fenced code blocks should be surrounded by blank lines).

 }

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: Path: .coderabbit.yaml

**Review profile**: ASSERTIVE

**Plan**: Pro

<details>
<summary>📥 Commits</summary>

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

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `README.md` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🧠 Learnings (2)</summary>

<details>
<summary>📓 Common learnings</summary>

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.


</details>
<details>
<summary>📚 Learning: 2025-08-14T18:50:06.159Z</summary>

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`

</details>

</details><details>
<summary>🪛 markdownlint-cli2 (0.18.1)</summary>

<details>
<summary>README.md</summary>

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

(MD009, no-trailing-spaces)

---

72-72: Trailing spaces
Expected: 0 or 2; Actual: 8

(MD009, no-trailing-spaces)

---

73-73: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)

---

79-79: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

---

79-79: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (1)</summary><blockquote>

<details>
<summary>README.md (1)</summary><blockquote>

`54-78`: **Configuration looks good, package name is consistent.**

The Kotlin DSL example correctly mirrors the Groovy DSL configuration with appropriate Kotlin syntax (`tasks.withType<JavaCompile>()`, `configureEach {}`, etc.), and the `AnnotatedPackages` configuration matches the Groovy example at line 40.

</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Copy link
Collaborator

@msridhar msridhar left a comment

Choose a reason for hiding this comment

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

Looks great to me, thank you!

@msridhar msridhar enabled auto-merge (squash) November 24, 2025 23:29
@msridhar
Copy link
Collaborator

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

@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ 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           

☔ 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.

@msridhar
Copy link
Collaborator

msridhar commented Dec 2, 2025

@sdelamo any update on the CLA?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants