Skip to content

Sync linux.yaml's lint job with pr.yaml, add Error Prone - #3596

Merged
dbwiddis merged 1 commit into
oshi:masterfrom
dbwiddis:sync-linux-ci-lint
Aug 12, 2026
Merged

dbwiddis merged 1 commit into
oshi:masterfrom
dbwiddis:sync-linux-ci-lint

Conversation

@dbwiddis

@dbwiddis dbwiddis commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

Summary

linux.yaml's push-to-master lint job hadn't been touched by either #3594 (Error Prone groundwork) or #3595 (fixing the ERROR-severity backlog), so it had drifted: still ran the plain javadoc:javadoc report goal instead of the stricter release-profile check pr.yaml now uses, and never ran Error Prone at all.

Split it into the same lint-format/lint-verify/error-prone jobs as pr.yaml, so push-to-master gets identical static analysis coverage to every PR, and a future change to one workflow doesn't silently leave the other behind.

Note: until #3595 merges, the new error-prone job here will show red on pushes to master (the 5 ERROR-severity findings it fixes aren't merged yet) — that's expected and self-resolves once #3595 lands, not a problem with this change.

No CHANGELOG entry — pure CI configuration.

Test plan

Summary by CodeRabbit

  • Chores
    • Improved Linux continuous integration by separating formatting, verification, and static analysis checks.
    • Verification now includes release-profile, API usage, and logging compatibility checks.
    • Added static analysis coverage for JDK 25.

linux.yaml's push-to-master lint job hadn't been touched by the last two
PRs and had drifted: still ran the plain javadoc:javadoc report goal
instead of the stricter release-profile check, and never ran Error Prone
at all. Split it into the same lint-format/lint-verify/error-prone jobs
as pr.yaml so push-to-master gets the same static analysis coverage as
every PR, and future changes to one only need to remember the other.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 95a49f1f-bcae-4442-887f-ad94108df1a2

📥 Commits

Reviewing files that changed from the base of the PR and between 7e430d8 and b45bea9.

📒 Files selected for processing (1)
  • .github/workflows/linux.yaml
📜 Recent review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: Codacy Static Code Analysis
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3307
File: .github/workflows/netbsd.yaml:4-8
Timestamp: 2026-05-30T02:28:01.891Z
Learning: In the oshi/oshi repository, the `.github/workflows/netbsd.yaml` CI workflow intentionally triggers only on `push` to the `netbsd-port` branch during development. Before the final merge to master, NetBSD CI will be integrated into the main Unix CI workflow (e.g., `.github/workflows/pr.yaml` or equivalent). Do not flag the limited trigger scope as an issue on this PR.
📚 Learning: 2026-08-05T23:44:09.936Z
Learnt from: CR
Repo: oshi/oshi PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-08-05T23:44:09.936Z
Learning: Applies to oshi-core/src/main/java/**/*.java : Use Java 8-compatible language features in `oshi-core`; do not use `var`, `List.of`, records, switch expressions, text blocks, or `Stream.toList()`.

Applied to files:

  • .github/workflows/linux.yaml
📚 Learning: 2026-05-31T05:53:04.246Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3311
File: .github/workflows/site.yaml:21-21
Timestamp: 2026-05-31T05:53:04.246Z
Learning: When a GitHub Actions workflow verifies that a pinned commit SHA matches a version tag, dereference annotated tags before comparing to a commit SHA. The API `GET /repos/{owner}/{repo}/git/refs/tags/{tag}` returns the tag *object* SHA for annotated tags (not the underlying commit SHA), so comparing it directly to a commit SHA will cause false mismatches. Instead: (1) fetch the tag object SHA via `GET /repos/{owner}/{repo}/git/refs/tags/{tag}`; (2) resolve that tag object to the underlying commit by calling `GET /repos/{owner}/{repo}/git/tags/{tag_object_sha}`; (3) compare the pinned commit SHA to the resolved commit at `.object.sha`.

Applied to files:

  • .github/workflows/linux.yaml
📚 Learning: 2026-07-21T20:38:16.728Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3509
File: oshi-demo/pom.xml:72-80
Timestamp: 2026-07-21T20:38:16.728Z
Learning: For the OSHI Maven/Jacoco CI workflows, coverage aggregation/report upload steps should run only when the test job succeeds (e.g., guard with conditions like `if: success()`). Do not add logic to generate/upload or preserve aggregate coverage artifacts after test failures, and avoid fragile/over-engineered handling of exit status unless there is an explicit separate project requirement.

Applied to files:

  • .github/workflows/linux.yaml
🔇 Additional comments (3)
.github/workflows/linux.yaml (3)

18-24: LGTM!


42-69: LGTM!


70-89: LGTM!


📝 Walkthrough

Walkthrough

Linux CI now separates formatting, verification, and Error Prone analysis. Verification includes release-profile packaging, Forbidden APIs, and SLF4J 1.7 compatibility checks. Error Prone runs on JDK 25.

Changes

Linux CI analysis

Layer / File(s) Summary
Dedicated formatting checks
.github/workflows/linux.yaml
The former combined lint job is replaced with a lint-format job for Spotless and Checkstyle.
Release and compatibility verification
.github/workflows/linux.yaml
The lint-verify job runs release-profile validation without signing, Forbidden APIs, and SLF4J 1.7 compatibility checks.
JDK 25 Error Prone analysis
.github/workflows/linux.yaml
A new job runs the error-prone Maven profile on JDK 25. Warnings are allowed, but errors fail the job.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

A rabbit checks the Linux lane,
With tidy hops through every chain.
Spotless shines and styles align,
Release checks guard each build line.
Error Prone watches from JDK 25—
“No errors here!” the rabbit cries.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes synchronizing linux.yaml with pr.yaml and adding Error Prone analysis.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@dbwiddis
dbwiddis merged commit f33f57d into oshi:master Aug 12, 2026
2 checks passed
@dbwiddis
dbwiddis deleted the sync-linux-ci-lint branch August 12, 2026 18:02
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