github.com/googleapis/api-linter@v1.65.2/docs/rules/0140/abbreviations.md (about) 1 --- 2 rule: 3 aip: 140 4 name: [core, '0140', abbreviations] 5 summary: Field names should use common abbreviations. 6 permalink: /140/abbreviations 7 redirect_from: 8 - /0140/abbreviations 9 --- 10 11 # Field names: Abbreviations 12 13 This rule enforces that field names use common abbreviations, as mandated in 14 [AIP-140][]. 15 16 ## Details 17 18 This rule checks every descriptor in the proto and complains if the long form 19 of any of the following words are used instead of the abbreviation: 20 21 - configuration 22 - identifier 23 - information 24 - specification 25 - statistics 26 27 ## Examples 28 29 ### Single word method 30 31 **Incorrect** code for this rule: 32 33 ```proto 34 // Incorrect. 35 message Book { 36 string name = 1; 37 string identifier = 2; // Should be `id`. 38 } 39 ``` 40 41 **Correct** code for this rule: 42 43 ```proto 44 // Correct. 45 message Book { 46 string name = 1; 47 string id = 2; 48 } 49 ``` 50 51 ## Disabling 52 53 If you need to violate this rule, use a leading comment above the method. 54 Remember to also include an [aip.dev/not-precedent][] comment explaining why. 55 56 ```proto 57 // (-- api-linter: core::0140::abbreviations=disabled 58 // aip.dev/not-precedent: We need to do this because reasons. --) 59 message Book { 60 string name = 1; 61 string identifier = 2; // Should be `id`. 62 } 63 ``` 64 65 If you need to violate this rule for an entire file, place the comment at the 66 top of the file. 67 68 [aip-140]: https://aip.dev/140 69 [aip.dev/not-precedent]: https://aip.dev/not-precedent