# googlesamples/android-custom-lint-rules

This sample demonstrates how to create a custom lint checks and corresponding lint tests

Repository: https://github.com/googlesamples/android-custom-lint-rules
Canonical: https://ross.abutalabs.com/products/android-custom-lint-rules
Language: Kotlin
License: Apache-2.0
License Family: permissive
Last push: 2026-02-26T18:14:56+00:00

## Health v2 (maintenance only)
Score: 63/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 69, release rhythm 35, longevity 100
- inputs: {"age_days": 4024, "days_push": 188, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1017, forks 175 (observed 2026-08-28T04:03:14.694660+00:00)

## What it is
An official Google sample project demonstrating how to write, test, and package custom Android Lint rules in Kotlin/Java. It includes example lint checks, their tests, and documentation on distributing rules via lint.jar inside AAR libraries.

## Use cases
- write custom android lint rules
- how to create custom lint checks for android library
- test custom lint checks
- package lint rules in an aar
- enforce company-specific code rules with lint
- learn the android lint api

## When to choose
- you are an Android library author wanting to ship lint rules with your library
- you need to enforce team- or company-specific coding rules in Android projects
- you want a working reference for the Android Lint API and its testing setup

## When to avoid
- you need a production lint library rather than a sample to copy from
- you want static analysis for non-JVM languages
- you need a stable API - the lint API is explicitly not final and changes between releases

## Facets
- artifact type: learning-resource
- maturity: active
- function: testing, linter, developer-tools
- domain: android-tools, developer-tools, testing, tutorials
- platform: jvm, cli
- tags: android-lint, static-analysis, custom-lint-rules, sample-project, kotlin, android

## Member repositories
- googlesamples/android-custom-lint-rules (main) score 63

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:14.694660+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:11:12.386156+00:00, confidence not recorded.
  - readme: https://github.com/googlesamples/android-custom-lint-rules (fetched 2026-08-28T04:03:14.694660+00:00, sha 63f10f4b98fd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
