googleapis / googleapis/api-linter
Check for common aliases in field and message names
- Dominant language
- Go
- Stars
- 765
- Forks
- 181
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 3
Description
Some examples for fields:
- `string github_repo = 1` (not `git_hub_repo`)
- `string stackoverflow_username = 1` (not `stack_overflow_username`)
- `string bigquery_table = 1` (not `big_query_table`)
And fields in camel-case:
- `{"githubRepo": "foo"}` (not `gitHubRepo`)
- `{"stackoverflowUsername": "foo"}` (not `stackOverflowUsername`)
- `{"bigqueryTable": "foo"}` (not `bigQueryTable`)
And similarly for upper camel case:
- `GithubRepoConfig` (not `GitHubRepoConfig`)
- `StackoverflowProfile` (not `StackOverflowProfile`)
- `BigqueryTableConfig` (not `BigQueryTableConfig`)
The general idea is that even where a trademarked name has capital letters inside the name (or multiple pieces of a name where each is capitalized), we treat it as a single "unit" and then join it using whatever style is relevant (snake case, camel case, etc).
This can sometimes look strange when the cases are similar (e.g., `BigQuery` is the trademarked name, but we use `BigqueryTableConfig`) but if we were to capitalize each portion, that would hint that this is two distinct units rather than one (`BigQueryTableConfig` split into pieces is: [Big, Query, Table, Config])
Contributor guide
Assessment
This issue has not been assessed yet.