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

makefile: Add whitespace check #39

Merged
merged 2 commits into from
Dec 6, 2022
Merged

makefile: Add whitespace check #39

merged 2 commits into from
Dec 6, 2022

Conversation

oshoval
Copy link
Collaborator

@oshoval oshoval commented Dec 4, 2022

Also fix the needed whitespace (using make whitespace)

None

@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/M release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Dec 4, 2022
@dteplits
Copy link
Contributor

dteplits commented Dec 4, 2022

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2022
@@ -67,6 +67,12 @@ create-nodeport:
bump-kubevirtci:
./hack/bump-kubevirtci.sh

whitespace:
Copy link
Member

Choose a reason for hiding this comment

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

I find it redundant to use third party github action for the whutespace and on the same time to implemet the logic by ourselves. I would keep just the github action.
It would be even better if we have an action verifying make fmt was invoked. Comparing the existing code and the code after make fmt.

Copy link
Collaborator Author

@oshoval oshoval Dec 5, 2022

Choose a reason for hiding this comment

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

we dont use 3rd party, the github calls the target of make file
unless you mean make fmt or something fixes whitespace

github actions runs the check make whitespace-check
the github shows if there is an error, and then you can run locally easily the make whitespace in order to fix it easier, if forgotten

about fmt / vet it can be done later, not related to this PR

Copy link
Member

Choose a reason for hiding this comment

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

you're right. I missed that, thought we are using a third party action.

Regardung the fmt- youre writing - Please remove trailing whitespaces using make fmt:' did you mean make whitespace? If make fmtdoes the job, butmake whitespace` is needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

should be make whitespace (which was what i used as well in this PR to fix the whitespaces)
there might be a way also with make fmt need to check

Copy link
Collaborator Author

@oshoval oshoval Dec 6, 2022

Choose a reason for hiding this comment

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

I recall that i did try make fmt (and also retried now),
it doesn't fix it, at least not out of the box
will fix the text string

@oshoval
Copy link
Collaborator Author

oshoval commented Dec 6, 2022

Rebase
Addressed comments

@@ -9,7 +9,7 @@ function fix() {
function check() {
invalid_files=$(git ls-files -- ':!vendor/' | xargs egrep -Hn " +$" || true)
if [[ $invalid_files ]]; then
echo 'Found trailing whitespaces. Please remove trailing whitespaces using `make fmt`:'
echo 'Found trailing whitespaces. Please remove trailing whitespaces using `make whitespace`:'
Copy link
Member

Choose a reason for hiding this comment

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

Please move this fix to the previous commit.

Signed-off-by: Or Shoval <oshoval@redhat.com>
Signed-off-by: Or Shoval <oshoval@redhat.com>
@oshoval
Copy link
Collaborator Author

oshoval commented Dec 6, 2022

Addressed comments

@AlonaKaplan
Copy link
Member

/lgtm
/approve

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 6, 2022
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AlonaKaplan

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 6, 2022
@oshoval
Copy link
Collaborator Author

oshoval commented Dec 6, 2022

/retest

@kubevirt-bot kubevirt-bot merged commit 53b6031 into kubevirt:main Dec 6, 2022
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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants