Skip to content

Document how to run style/static-analysis checks locally - #4452

Draft
arnaud-lacurie wants to merge 2 commits into
mainfrom
apple/arnaud-lacurie/document-style-checks
Draft

arnaud-lacurie wants to merge 2 commits into
mainfrom
apple/arnaud-lacurie/document-style-checks

Conversation

@arnaud-lacurie

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a "Style / static analysis checks" section to the using-gradle skill: the CI-parity
    command (matching .github/workflows/pull_request.yml's style job), report locations,
    and a couple of common Checkstyle/PMD violations that show up when hand-resolving merge
    conflicts (redundant same-package imports, unnecessary fully-qualified names).
  • Adds a PR Workflow reminder in AGENTS.md to run these checks before pushing.

Motivated by hitting exactly these violations while manually rebasing a stack of PRs across a
few months of upstream drift — nothing in the skills documented how to reproduce CI's style
check locally, so it wasn't caught until CI ran.

Test plan

  • N/A — documentation only

Adds a "Style / static analysis checks" section to the using-gradle
skill (CI-parity command, report locations, common violations seen
when hand-resolving merge conflicts) and a PR Workflow reminder to
run it before pushing.
@arnaud-lacurie arnaud-lacurie added the documentation Documentation change label Aug 14, 2026

@robert-brunel robert-brunel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In my opinion, some of these guidelines would be good to put in the general public Building.md guide for every developer (from where agents can then presumably just pick them up just as well).

The documented style-check command was missing -PreleaseBuild=false
-PpublishBuild=false, which CI's style job actually passes -- running
without them can hide failures that only reproduce under the real flags.
Also documents two SpotBugs quirks hit while rolling out jspecify
module-by-module: missing-annotation-class analysis failures across
compileOnly boundaries, and NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION
false positives between mixed annotation libraries.

This branch has not been deployed

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

Labels

documentation Documentation change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants