-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[no squash] Check for indent spaces #15002
Conversation
4056985
to
8e819ca
Compare
I'm not sure about disallowing less than 4 spaces after a tab, i.e. in my opinion |
There's a surprisingly high amount of space indentation. But also half of the changes are getting rid of valid alignment. Alignment is too useful for readability to forbid imo. Which is why I'm against this PR in its current state. 👎 Something more conservative could maybe work, i.e.:
|
8e819ca
to
dabe621
Compare
dabe621
to
aa19202
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, I'm fine with the indentions, but I haven't looked at the script yet.
aa19202
to
cff97ef
Compare
Could you please add some comments, so that for example one doesn't have to read through the whole preprocess script to find out what it does? So, what this disallows now is spaces after tabs and multiline comments that start in the same line that another multiline comment ends? |
3629936
to
ba50c9d
Compare
I added some comments, I hope it helps.
Now spaces at the beginning of the line and spaces after tabs only if the indent is smaller than on the previous line. The multiline comments part is questionable.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Python script is a bit hard to follow.
Whitespace changes look mostly good.
ba50c9d
to
074e947
Compare
@Desour Everything should be done now. |
(See also unresolved older comments.) It's just a CI script, so it doesn't need to be perfect, right? I don't want to be overly pedantic. |
291a0ea
to
23df68b
Compare
@Desour Should be fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine from what I can tell.
One trivial thing I noticed: The python script is not marked executable. The other files in util/ci are.
Btw. add [no squash] to your PR title if you want no squashing.
@sfence rebase needed |
23df68b
to
9a36104
Compare
9a36104
to
f2b0772
Compare
(My approval holds. You can merge with self-approval, btw.) |
Continue of #14983
This PR checks the indent in C/C++ and Lua files if somewhere spaces are used.
It ignores spaces in multiline comments.
To do
This PR is a Ready for Review
How to test
Run grep commands and Python script over the test file:
test_C_file.txt