-
Notifications
You must be signed in to change notification settings - Fork 193
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
ci: add whitespace check #1881
base: master
Are you sure you want to change the base?
ci: add whitespace check #1881
Conversation
a241ac5
to
7648faa
Compare
I thought it was pretty funny that in an earlier version, whitespace.yml didn't end in a newline... 😄 |
67fe2db
to
b0c0bef
Compare
f7f317f
to
de57fac
Compare
@jdchristensen OK sorry for the noise. I think I'm done with this sprint. The first commit adds the CI checks. The second fixes the end newlines and the third fixes the trailing white spaces. Just to be sure I will push each commit separately again. |
de57fac
to
062a2df
Compare
Here is the first commit, it should fail the check as there are trailing whitespaces in the library. And it does. |
e9931e4
to
60696f5
Compare
Here is the second commit, it should fail because only the trailing white spaces have been fixed but there are still problems with the end newlines. |
60696f5
to
13cc131
Compare
Here is the third commit. The end newlines have now been fixed and all the checks pass. |
Once we merge this, I'll prepare a PR that ignores these commits from git blame so that there aren't spurious blames everywhere and our history is clean. I can't do that now as the hash might change. |
Oh and I forgot to drop the commit removing the whitespace, here is that done now. |
@Alizter, thanks for figuring out how to do this. Is it easy to do something like |
@jdchristensen We have a shallow clone of the commits in the PR when doing the whitespace checks. I'll see if I can make it a single check rather than iterating over each commit. Hmm actually this depends on whatever |
a174fa1
to
78a5ba2
Compare
This adds a whitespace check to the CI that fails if there is trailing white space or a file does not end with a newline. Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: f0c063fd-98da-45ac-8ad8-a79a093f737b -->
<!-- ps-id: 925b1ad7-6f77-4af7-9bcc-67adb5a6f2f9 --> Signed-off-by: Ali Caglayan <[email protected]>
<!-- ps-id: 1af6c3bc-7c17-40af-b082-6c263579d996 --> Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: cc54f85f-455b-454f-91a6-069e3be58f99 -->
<!-- ps-id: 27aaca6c-4c08-4edc-86c4-576f379161ef --> Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: f20d7036-af32-4dc7-8497-a4fc436e560e -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 070a142f-9cf5-4141-a1f0-02b2504cd70d -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 895e000d-e169-4a6b-a2d4-e2a3a25dde57 -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 5a7ce2f1-dfb6-4426-99e5-8ba60f468934 -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: ae1e2e79-392a-47d3-906b-8d45142cd5f1 -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: c846bb6b-9189-4f94-a9cd-1c352e7866e9 -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: b4894953-798e-44fe-98a4-e4d6772f7617 -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 56342511-dc5b-49c6-87ac-08def4397d93 -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: 3d7515f0-da9f-487c-a21b-c7d543f84d67 -->
Signed-off-by: Ali Caglayan <[email protected]> <!-- ps-id: fb46e55d-ab1f-4436-b100-38c54d80e13f -->
78a5ba2
to
dee36b9
Compare
I got something sort-of working, but I can't get github actions to print the commit, file and location of the whitespace. I am out of energy for today, so I will take another look later. |
This adds a whitespace check to the CI that fails if there is trailing white space or a file does not end with a newline.