|
| 1 | +# Background |
| 2 | + |
1 | 3 | As general background, `OWNERS` files expedite code reviews by helping code
|
2 | 4 | authors quickly find relevant reviewers, and they also ensure that stakeholders
|
3 | 5 | are involved in code changes in their areas.
|
@@ -27,8 +29,40 @@ main `services/core/` project:
|
27 | 29 | * `media/`
|
28 | 30 | * `wifi/`
|
29 | 31 |
|
| 32 | +# Design |
| 33 | + |
30 | 34 | Area maintainers are strongly encouraged to list people in a single
|
31 | 35 | authoritative `OWNERS` file in **exactly one** location. Then, other paths
|
32 | 36 | should reference that single authoritative `OWNERS` file using an include
|
33 | 37 | directive. This approach ensures that updates are applied consistently across
|
34 | 38 | the tree, reducing maintenance burden.
|
| 39 | + |
| 40 | +# Examples |
| 41 | + |
| 42 | +The exact syntax of `OWNERS` files can be difficult to get correct, so here are |
| 43 | +some common examples: |
| 44 | + |
| 45 | +``` |
| 46 | +# Complete include of top-level owners from this repo |
| 47 | +include /ZYGOTE_OWNERS |
| 48 | +# Partial include of top-level owners from this repo |
| 49 | +per-file ZygoteFile.java = file:/ZYGOTE_OWNERS |
| 50 | +``` |
| 51 | +``` |
| 52 | +# Complete include of subdirectory owners from this repo |
| 53 | +include /services/core/java/com/android/server/net/OWNERS |
| 54 | +# Partial include of subdirectory owners from this repo |
| 55 | +per-file NetworkFile.java = file:/services/core/java/com/android/server/net/OWNERS |
| 56 | +``` |
| 57 | +``` |
| 58 | +# Complete include of top-level owners from another repo |
| 59 | +include platform/libcore:/OWNERS |
| 60 | +# Partial include of top-level owners from another repo |
| 61 | +per-file LibcoreFile.java = file:platform/libcore:/OWNERS |
| 62 | +``` |
| 63 | +``` |
| 64 | +# Complete include of subdirectory owners from another repo |
| 65 | +include platform/frameworks/av:/camera/OWNERS |
| 66 | +# Partial include of subdirectory owners from another repo |
| 67 | +per-file CameraFile.java = file:platform/frameworks/av:/camera/OWNERS |
| 68 | +``` |
0 commit comments