Skip to content
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

✨ feat: parse negative integers #470

Merged

Conversation

knight42
Copy link
Member

@knight42 knight42 commented Aug 11, 2020

Signed-off-by: knight42 anonymousknight96@gmail.com

This adds support for negative integers in the marker syntax parser. This is useful for markers like +kubebuilder:validation:Minimum

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 11, 2020
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 11, 2020
@DirectXMan12
Copy link
Contributor

Code looks good

Two comments:

  1. This need a more detailed explanation of what it's doing in the PR/commit message -- maybe something like
✨ Support negative integers in marker syntax

This adds support for negative integers in the marker syntax parser.  This is useful for markers like PUT THE MOTIVATING CASE HERE

(please dd the motivating marker to the message)

  1. Please update the marker syntax explanation Godoc at the top of that file as well as the book reference page (https://book.kubebuilder.io/reference/markers.html) to mention that negative integers are supported.

This adds support for negative integers in the marker syntax parser.
This is useful for markers like `+kubebuilder:validation:Minimum`.

Signed-off-by: knight42 <anonymousknight96@gmail.com>
@knight42
Copy link
Member Author

@DirectXMan12 PTAL

Copy link

@alastor-erinyes alastor-erinyes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/assign @alvaroaleman

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: knight42, vincepri

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 19, 2020
@alvaroaleman
Copy link
Member

Hmm, I am almost inclined to say doc update isn't needed because I intuitively expect an int to support negative values (otherwise its an uint)?
/lgtm
/hold

To give Solly a but of time to respond re docs

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Aug 19, 2020
@DirectXMan12
Copy link
Contributor

@alvaroaleman that's a fair point. This does just bring things in line with what you might expect. Consider that objection withdrawn.

@DirectXMan12
Copy link
Contributor

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 10, 2020
@k8s-ci-robot k8s-ci-robot merged commit 359a540 into kubernetes-sigs:master Sep 10, 2020
@knight42 knight42 deleted the feat/parse-negative-int branch September 10, 2020 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants