github.com/googleapis/api-linter@v1.65.2/docs/rules/0192/absolute-links.md (about) 1 --- 2 rule: 3 aip: 192 4 name: [core, '0192', absolute-links] 5 summary: Comments must use absolute links 6 permalink: /192/absolute-links 7 redirect_from: 8 - /0192/absolute-links 9 --- 10 11 # Absolute links 12 13 This rule attempts to enforce that every descriptor in every proto file uses 14 absolute links, as mandated in [AIP-192][]. 15 16 ## Details 17 18 This rule looks at each descriptor in each proto file (exempting oneofs and the 19 file itself) and tries to find Markdown links using the `[link](uri)` syntax, 20 and complains if the URI does not have `://` in it. 21 22 ## Examples 23 24 **Incorrect** code for this rule: 25 26 ```proto 27 // Incorrect. 28 // A representation of [a book](/wiki/Book). 29 message Book { 30 string name = 1; 31 } 32 ``` 33 34 **Correct** code for this rule: 35 36 ```proto 37 // Correct. 38 // A representation of [a book](https://en.wikipedia.org/wiki/Book). 39 message Book { 40 string name = 1; 41 } 42 ``` 43 44 ## Disabling 45 46 If you need to violate this rule, use a leading comment above the descriptor 47 (and revel in the irony). Remember to also include an [aip.dev/not-precedent][] 48 comment explaining why. 49 50 ```proto 51 // (-- api-linter: core::0192::absolute-links=disabled 52 // aip.dev/not-precedent: We need to do this because reasons. --) 53 // A representation of [a book](/wiki/Book). 54 message Book { 55 string name = 1; 56 } 57 ``` 58 59 [aip-192]: https://aip.dev/192 60 [aip.dev/not-precedent]: https://aip.dev/not-precedent