github.com/googleapis/api-linter@v1.65.2/docs/rules/0191/proto-package.md (about)

     1  ---
     2  rule:
     3    aip: 191
     4    name: [core, '0191', proto-package]
     5    summary: Proto package must match the directory structure.
     6  permalink: /191/proto-package
     7  redirect_from:
     8    - /0191/proto-package
     9  ---
    10  
    11  # Protobuf Package
    12  
    13  This rule attempts to enforce that the proto package and the directory structure
    14  match, as mandated in [AIP-191][].
    15  
    16  ## Details
    17  
    18  Accordig to the [Protobuf Style Guide][], the package name must correspond to
    19  the directory structure.
    20  
    21  This rule currently complains if the package and the directory structure do not
    22  correspond.
    23  
    24  ## Examples
    25  
    26  **Incorrect** directory structures and proto packages for this rule:
    27  
    28  - `example/v1` `example.library.v1`
    29  - `example/library/v1` `example.librarian.v1`
    30  
    31  **Correct** directory structures and proto packages for this rule:
    32  
    33  - `example/library/v1` `example.library.v1`
    34  - `example/library/v1/types` `example.library.v1.types`
    35  
    36  ## Disabling
    37  
    38  If you need to violate this rule, use a comment at the top of the file.
    39  Remember to also include an [aip.dev/not-precedent][] comment explaining why.
    40  
    41  ```proto
    42  // (-- api-linter: core::0191::proto-package=disabled
    43  //     aip.dev/not-precedent: We need to do this because reasons. --)
    44  syntax = "proto3";
    45  ```
    46  
    47  [aip-191]: https://aip.dev/191
    48  [aip.dev/not-precedent]: https://aip.dev/not-precedent
    49  [Protobuf Style Guide]: https://developers.google.com/protocol-buffers/docs/style#packages