Skip to content

(WIP)feat: added nilaway to the repo#616

Closed
jkawan wants to merge 2 commits intomainfrom
feat-add-nilaway
Closed

(WIP)feat: added nilaway to the repo#616
jkawan wants to merge 2 commits intomainfrom
feat-add-nilaway

Conversation

@jkawan
Copy link
Copy Markdown
Contributor

@jkawan jkawan commented Feb 10, 2026

Summary by cubic

Add NilAway static analysis to catch nil-safety issues early in CI and locally. CI runs NilAway via go run, and a new make target simplifies local checks.

  • New Features
    • Added make nilaway target: go run go.uber.org/nilaway/cmd/nilaway@latest ./...
    • CI runs NilAway with go run instead of installing the binary
    • Updated go.mod toolchain to 1.24.3

Written for commit e241914. Summary will update on new commits.

Summary by CodeRabbit

  • Chores
    • Updated Go toolchain to a previous version
    • Added static analysis tooling to the build pipeline as a new build target
    • Simplified continuous integration workflow to use inline tool execution instead of pre-installation
    • Static analysis now automatically runs after dependency management steps

Jenita added 2 commits February 10, 2026 17:13
- Add tools.go to track nilaway as a development dependency
- Add 'make nilaway' target for local static analysis
- Update CI workflow to run nilaway via go run for consistency
- Pin nilaway dependency in go.mod/go.sum
Signed-off-by: Jenita <jkawan@blinklabs.io>
@jkawan jkawan requested a review from a team as a code owner February 10, 2026 23:31
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 10, 2026

📝 Walkthrough

Walkthrough

Modified the nilaway code analysis workflow by updating the GitHub Actions workflow to invoke nilaway through go run instead of a pre-installed binary, eliminating the explicit installation step. Added a new nilaway make target to the Makefile that depends on mod-tidy and executes nilaway via go run for code analysis, updating the PHONY targets list accordingly. Updated the Go toolchain version in go.mod from go1.24.4 to go1.24.3.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 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 nilaway (a nil-checking tool) to the repository. The title is clear, specific, and directly related to the primary objective of the pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-add-nilaway

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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

@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

🤖 Fix all issues with AI agents
In `@go.mod`:
- Line 5: The go.mod specifies an outdated toolchain version ("toolchain
go1.24.3"); update this to the latest Go 1.24 patch (e.g., "toolchain
go1.24.13") so the repository uses the current stable 1.24.x; edit the toolchain
line in go.mod accordingly and run `go mod tidy`/local build to verify
compatibility (referencing the toolchain line in go.mod).
🧹 Nitpick comments (1)
.github/workflows/nilaway.yml (1)

22-23: Consider pinning nilaway to a specific version instead of @latest.

Using @latest means different CI runs may use different nilaway versions, leading to non-reproducible results (e.g., a new nilaway release could suddenly cause failures unrelated to code changes). Consider pinning to a specific version like go.uber.org/nilaway/cmd/nilaway@v0.x.y.

go 1.24.0

toolchain go1.24.4
toolchain go1.24.3
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

git log --oneline -20 go.mod

Repository: blinklabs-io/adder

Length of output: 89


🏁 Script executed:

cat go.mod

Repository: blinklabs-io/adder

Length of output: 4629


🏁 Script executed:

cat .github/workflows/golangci-lint.yml

Repository: blinklabs-io/adder

Length of output: 768


🌐 Web query:

Go 1.24 latest patch version 2026

💡 Result:

As of February 10, 2026, the latest Go 1.24 patch release is Go 1.24.13, released on February 4, 2026. [1][2]


Toolchain version go1.24.3 is outdated — consider updating to latest stable 1.24.x

The current toolchain version is go1.24.3 while the latest Go 1.24 patch release is go1.24.13 (Feb 4, 2026). Since the repo maintains Go 1.24 support alongside 1.25 testing in CI for backward compatibility, using the latest stable 1.24.x patch would align better with maintenance practices and ensure all critical patches are included.

🤖 Prompt for AI Agents
In `@go.mod` at line 5, The go.mod specifies an outdated toolchain version
("toolchain go1.24.3"); update this to the latest Go 1.24 patch (e.g.,
"toolchain go1.24.13") so the repository uses the current stable 1.24.x; edit
the toolchain line in go.mod accordingly and run `go mod tidy`/local build to
verify compatibility (referencing the toolchain line in go.mod).

@jkawan jkawan closed this Feb 10, 2026
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 3 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="Makefile">

<violation number="1" location="Makefile:43">
P2: Pin the nilaway tool version instead of using `@latest` so CI and local runs stay deterministic.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

go test -v -race ./...

nilaway: mod-tidy
go run go.uber.org/nilaway/cmd/nilaway@latest ./...
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot Feb 10, 2026

Choose a reason for hiding this comment

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

P2: Pin the nilaway tool version instead of using @latest so CI and local runs stay deterministic.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Makefile, line 43:

<comment>Pin the nilaway tool version instead of using `@latest` so CI and local runs stay deterministic.</comment>

<file context>
@@ -39,6 +39,9 @@ swagger:
 	go test -v -race ./...
 
+nilaway: mod-tidy
+	go run go.uber.org/nilaway/cmd/nilaway@latest ./...
+
 # Build adder-tray binary
</file context>
Fix with Cubic

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.

1 participant