api-linter

module
v1.29.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2022 License: Apache-2.0

README

Commure API Linter

ci latest release go version

Note: This is a fork of the Google API Linter, made to allow some customizations of its framework that are not possible through configuration. Most notably, the name field used for resource keys has been changed to resource_name.

The API linter provides real-time checks for compliance with many of Google's API standards, documented using API Improvement Proposals. It operates on API surfaces defined in protocol buffers.

It identifies common mistakes and inconsistencies in API surfaces:

// Incorrect.
message GetBookRequest {
  // This is wrong; it should be spelled `name`.
  string book = 1;
}

When able, it also offers a suggestion for the correct fix.

Read more ≫

Versioning

The Commure API linter does not follow semantic versioning. Semantic versioning is challenging for a tool like a linter because the addition or correction of virtually any rule is "breaking" (in the sense that a file that previously reported no problems may now do so).

Therefore, the version numbers refer to the linter's core interface. In general:

  • Releases with only documentation, chores, dependency upgrades, and/or bugfixes are patch releases.
  • Releases with new rules (or potentially removed rules) are minor releases.
  • Releases with core interface alterations are major releases. This could include changes to the internal Go interface or the CLI user interface.

Note: Releases that increment the Go version will be considered minor.

This is an attempt to follow the spirit of semantic versioning while still being useful.

License

This software is made available under the Apache 2.0 license.

Directories

Path Synopsis
cmd
api-linter
The command line `api-linter` checks Google APIs defined in Protobuf files.
The command line `api-linter` checks Google APIs defined in Protobuf files.
Package lint provides lint functions for Google APIs that register rules and user configurations, apply those rules to a lint request, and produce lint results.
Package lint provides lint functions for Google APIs that register rules and user configurations, apply those rules to a lint request, and produce lint results.
Package locations provides functions to get the location of a particular part of a descriptor, allowing Problems to be attached to just a descriptor's name, type, etc..
Package locations provides functions to get the location of a particular part of a descriptor, allowing Problems to be attached to just a descriptor's name, type, etc..
Package rules contains implementations of rules that apply to Google APIs.
Package rules contains implementations of rules that apply to Google APIs.
aip0122
Package aip0122 contains rules defined in https://aip.dev/122.
Package aip0122 contains rules defined in https://aip.dev/122.
aip0123
Package aip0123 contains rules defined in https://aip.dev/123.
Package aip0123 contains rules defined in https://aip.dev/123.
aip0124
Package aip0124 contains rules defined in https://aip.dev/124.
Package aip0124 contains rules defined in https://aip.dev/124.
aip0126
Package aip0126 contains rules defined in https://aip.dev/126.
Package aip0126 contains rules defined in https://aip.dev/126.
aip0127
Package aip0127 contains rules defined in https://aip.dev/127.
Package aip0127 contains rules defined in https://aip.dev/127.
aip0128
Package aip0128 contains rules defined in https://aip.dev/128.
Package aip0128 contains rules defined in https://aip.dev/128.
aip0131
Package aip0131 contains rules defined in https://aip.dev/131.
Package aip0131 contains rules defined in https://aip.dev/131.
aip0132
Package aip0132 contains rules defined in https://aip.dev/132.
Package aip0132 contains rules defined in https://aip.dev/132.
aip0133
Package aip0133 contains rules defined in https://aip.dev/133.
Package aip0133 contains rules defined in https://aip.dev/133.
aip0134
Package aip0134 contains rules defined in https://aip.dev/134.
Package aip0134 contains rules defined in https://aip.dev/134.
aip0135
Package aip0135 contains rules defined in https://aip.dev/135.
Package aip0135 contains rules defined in https://aip.dev/135.
aip0136
Package aip0136 contains rules defined in https://aip.dev/136.
Package aip0136 contains rules defined in https://aip.dev/136.
aip0140
Package aip0140 contains rules defined in https://aip.dev/140.
Package aip0140 contains rules defined in https://aip.dev/140.
aip0141
Package aip0141 contains rules defined in https://aip.dev/141.
Package aip0141 contains rules defined in https://aip.dev/141.
aip0142
Package aip0142 contains rules defined in https://aip.dev/142.
Package aip0142 contains rules defined in https://aip.dev/142.
aip0143
Package aip0143 contains rules defined in https://aip.dev/143.
Package aip0143 contains rules defined in https://aip.dev/143.
aip0144
Package aip0144 contains rules defined in https://aip.dev/144.
Package aip0144 contains rules defined in https://aip.dev/144.
aip0146
Package aip0146 contains rules defined in https://aip.dev/146.
Package aip0146 contains rules defined in https://aip.dev/146.
aip0148
Package aip0148 contains rules defined in https://aip.dev/148.
Package aip0148 contains rules defined in https://aip.dev/148.
aip0151
Package aip0151 contains rules defined in https://aip.dev/151.
Package aip0151 contains rules defined in https://aip.dev/151.
aip0152
Package aip0152 contains rules defined in https://aip.dev/152.
Package aip0152 contains rules defined in https://aip.dev/152.
aip0154
Package aip0154 contains rules defined in https://aip.dev/154.
Package aip0154 contains rules defined in https://aip.dev/154.
aip0156
Package aip0156 contains rules defined in https://aip.dev/156.
Package aip0156 contains rules defined in https://aip.dev/156.
aip0157
Package aip0157 contains rules defined in https://aip.dev/157.
Package aip0157 contains rules defined in https://aip.dev/157.
aip0158
Package aip0158 contains rules defined in https://aip.dev/158.
Package aip0158 contains rules defined in https://aip.dev/158.
aip0159
Package aip0159 contains rules defined in https://aip.dev/159.
Package aip0159 contains rules defined in https://aip.dev/159.
aip0162
Package aip0162 contains rules defined in https://aip.dev/162.
Package aip0162 contains rules defined in https://aip.dev/162.
aip0163
Package aip0163 contains rules defined in https://aip.dev/163.
Package aip0163 contains rules defined in https://aip.dev/163.
aip0164
Package aip0164 contains rules defined in https://aip.dev/164.
Package aip0164 contains rules defined in https://aip.dev/164.
aip0165
Package aip0165 contains rules defined in https://aip.dev/165.
Package aip0165 contains rules defined in https://aip.dev/165.
aip0191
Package aip0191 contains rules defined in https://aip.dev/191.
Package aip0191 contains rules defined in https://aip.dev/191.
aip0192
Package aip0192 contains rules defined in https://aip.dev/192.
Package aip0192 contains rules defined in https://aip.dev/192.
aip0203
Package aip0203 contains rules defined in https://aip.dev/203.
Package aip0203 contains rules defined in https://aip.dev/203.
aip0214
Package aip0214 contains rules defined in https://aip.dev/214.
Package aip0214 contains rules defined in https://aip.dev/214.
aip0215
Package aip0215 contains rules defined in https://aip.dev/215.
Package aip0215 contains rules defined in https://aip.dev/215.
aip0216
Package aip0216 contains rules defined in https://aip.dev/216.
Package aip0216 contains rules defined in https://aip.dev/216.
aip0217
Package aip0217 contains rules defined in https://aip.dev/217.
Package aip0217 contains rules defined in https://aip.dev/217.
aip0231
Package aip0231 contains rules defined in https://aip.dev/231.
Package aip0231 contains rules defined in https://aip.dev/231.
aip0233
Package aip0233 contains rules defined in https://aip.dev/233.
Package aip0233 contains rules defined in https://aip.dev/233.
aip0234
Package aip0234 contains rules defined in https://aip.dev/234.
Package aip0234 contains rules defined in https://aip.dev/234.
aip0235
Package aip0235 contains rules defined in https://aip.dev/235.
Package aip0235 contains rules defined in https://aip.dev/235.
aip4232
Package aip4232 contains rules defined in https://aip.dev/4232.
Package aip4232 contains rules defined in https://aip.dev/4232.
internal/data
Package data contains constants used in multiple AIP rules.
Package data contains constants used in multiple AIP rules.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL