-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document naming convention for boolean API fields #624
Conversation
Can you add an explanation? |
@kubernetes/api-approvers |
Any chance of an automated test to go along with this doc? |
What are some examples? I tried to find some using this command:
but all the examples seem to be from "componentconfig" and most of those are using the word "Enable". From that I might infer a rule about "Enable", but not about "-able". |
This is 100% in line with existing guidance. LGTM, although any additions you want to add as per request are fine. |
@erictune I thought the point of the comment was "never use Is*", which is true. Not the "*able" part, which is sometimes true. |
The point was: avoid Audit with:
|
That also goes for go coding style and general conventions. We may use |
Not to bikeshed :-) but....
|
Num describes fields that were confusing to users on first glance because they could be confused with a declarative action (NumUnreadyPods is strictly better than UnreadyPods).
The two have nothing to do with each other. I was just reiterating that this is also something we apply to coding conventions. Any other comments? |
nope - not from me |
I am skeptical of any bool field. They often end up wanting to be enums.
The fact that we have none today is pretty telling, IMO.
I don't have a problem with this PR, but I'd like to guide people away from
bool fields in most cases.
…On Mon, May 15, 2017 at 4:30 PM, Doug Davis ***@***.***> wrote:
nope - not from me
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
<#624 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFVgVFGee4jB9GKsWVQY88xxtSEpCu2sks5r6OAsgaJpZM4NbqtD>
.
|
We have tens of them - do we have a mismatch? |
Merging based on no disagreement, Tim will record his philosophical |
Document to avoid
IsBla
-type names for boolean properties.This is extremely consistent throughout our APIs, but not written down.