github.com/googleapis/api-linter@v1.65.2/docs/rules/0148/human-names.md (about)

     1  ---
     2  rule:
     3    aip: 148
     4    name: [core, '0148', human-names]
     5    summary: Avoid imprecise terms for human names.
     6  permalink: /148/human-names
     7  redirect_from:
     8    - /0148/human-names
     9  ---
    10  
    11  # Human names
    12  
    13  This rule encourages terms for human names (`given_name` and `family_name`)
    14  that are more accurate across cultures, as mandated in [AIP-148][].
    15  
    16  ## Details
    17  
    18  This rule looks for fields named `first_name` and `last_name`, and complains if
    19  it finds them, suggesting the use of `given_name` and `family_name`
    20  (respectively) instead.
    21  
    22  ## Examples
    23  
    24  **Incorrect** code for this rule:
    25  
    26  ```proto
    27  // Incorrect.
    28  message Human {
    29    string first_name = 1;  // Should be `given_name`.
    30    string last_name = 2;   // Should be `family_name`
    31  }
    32  ```
    33  
    34  **Correct** code for this rule:
    35  
    36  ```proto
    37  // Correct.
    38  message Human {
    39    string given_name = 1;
    40    string family_name = 2;
    41  }
    42  ```
    43  
    44  ## Disabling
    45  
    46  If you need to violate this rule, use a leading comment above the field or its
    47  enclosing message. Remember to also include an [aip.dev/not-precedent][]
    48  comment explaining why.
    49  
    50  ```proto
    51  // (-- api-linter: core::0148::human-names=disabled
    52  //     aip.dev/not-precedent: We need to do this because reasons. --)
    53  message Human {
    54    string first_name = 1;
    55    string last_name = 2;
    56  }
    57  ```
    58  
    59  If you need to violate this rule for an entire file, place the comment at the
    60  top of the file.
    61  
    62  [aip-148]: https://aip.dev/148
    63  [aip.dev/not-precedent]: https://aip.dev/not-precedent