verify-code-quality
Skill36 starsChanged 3 months agoApache-2.0View on GitHub
Run lint, static analysis, ABI validation and coverage gates for compose-swing-ui. Use when checking code quality, fixing style issues, or before committing.
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Run the scoped checks for what changed (below), fixing findings as they surface.
- Distinctive: line 13
Run the full gate once before committing:
- Very specific: line 28
Do not add clean or --rerun-tasks: Gradle's up-to-date checks are correct here, and discarding them turns a targeted check into a full …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Verify Code Quality
Order of work
- Run the scoped checks for what changed (below), fixing findings as they surface.
./gradlew :buildSrc:ktlintFormat ktlintFormatto auto-fix formatting, then check again../gradlew updateKotlinAbiif the public API changed, and review the dump diff.- Run the full gate once before committing:
./gradlew :buildSrc:ktlintCheck :buildSrc:detekt
./gradlew build --continueTwo commands, because buildSrc is an included build the root-level tasks do not reach. build runs
every module's check — compile, ktlint, detekt, the Compose lint checks, tests, checkKotlinAbi and
the coverage floors — plus assemble. --continue reports every failure in one run instead of
stopping at the first.
Scoping a run
Work with the narrowest tasks that cover the change; the full gate is what settles it before a commit.
Do not add clean or --rerun-tasks: Gradle's up-to-date checks are correct here, and discarding them
turns a targeted check into a full rebuild.
./gradlew :swing-ui:ktlintCheck :swing-ui:detektMain :swing-ui:detektTest :swing-ui:lint
./gradlew :swing-ui:checkKotlinAbi
./gradlew :swing-ui:jacocoTestCoverageVerificationjacocoTestCoverageVerification runs the module's tests to produce the report it measures.
Within a module, scope detekt as detektMain/detektTest, never detekt. buildSrc is the
exception: it configures detekt itself, and plain :buildSrc:detekt is its gate. CONTRIBUTING.md
explains what the plain task misses everywhere else.
What applies where
| Module | ktlint / detekt / lint | ABI dump |
buildSrc | ktlint and detekt only, invoked explicitly | no |
swing-ui | yes | yes |
swing-ui-test | yes | yes |
swing-ui-animation | no | yes |
samples/* | yes | no |
swing-ui-animation redistributes the Android Open Source Project's Jetpack Compose animation-core
verbatim, so it is exempt from the shared style gates by design. Keep it comparable to that upstream:
do not restyle it, and do not bring it under those gates.
Which modules carry a coverage floor, and each one's line and branch minimums, is set in that
module's own build.gradle.kts - read it there rather than here. CONTRIBUTING.md explains how the
floors are meant to be treated when a change moves one.
Public API
checkKotlinAbi compares the compiled surface against the dumps committed under <module>/api/. When
the public API changes intentionally, regenerate them and review the diff before committing:
./gradlew updateKotlinAbiTwo kinds of declaration are outside the dumps, so the gate cannot answer for them:
- anything annotated
@InternalSwingUiApi, which the validation filters out by configuration; - public inline functions with a reified type parameter, which compile to synthetic methods that
the dump skips. Changing one of their signatures breaks every caller while
checkKotlinAbistays green. Enumerate the current set rather than trusting a fixed list — it grows as the API does:git grep -n 'public inline fun <reified' swing-ui/src/main swing-ui-test/src/mainSwingNode,MenuNodeandSwingModifier.listenerare examples, not the whole set. Diff whatever the grep finds against its committed form by hand before concluding the surface is unchanged.
Why the build rejects code that compiles in an IDE
allWarningsAsErrors is on, so a warning fails the build. Published binaries target Java 11 and
Kotlin language and API level 2.2, independent of the toolchain the build runs on, so a newer language
feature or standard-library API fails to compile even on a current JDK.
Configuration
- detekt:
config/detekt/detekt.yml, layered on the default config and on the defaults:swing-ui-detektships. The file states the reason for each rule it turns off. - Android Lint, hosting the Compose lint checks:
config/lint/lint.xml. The file states the reason for each check it disables. - Coverage floors and ABI filters: each module's
build.gradle.kts. - The gates and the code style in prose:
CONTRIBUTING.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

