-
Notifications
You must be signed in to change notification settings - Fork 18
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
The formatter adds unnecessary tabs #17
Comments
I'll look into it. Is it just the function in .c files or are the function prototypes and struct, union, etc.. in header files also affected?
|
…er to ignore function declaration (broken with function typedef)
I pushed a quick fix, please try it and tell me where it breaks.
I already found a bug where typedef on function are ignored by the alignment. Also, It's not clear to me what should be aligned and what should only have one tab (I ran the norm on global variable with one tab and it passed). Aligned
Not Aligned (one tab between type and name)
Tell me if I'm missing something. |
Thank you for your quick response, and I'm sorry that I didn't check the previous issue and file a duplicated one. I tried to run the formatter but got an error. What I missed? (I don't use python often and need your help)
AlignmentThis is the entire norm rules about indentation:
Rule 1 above is applied to global vars just like other variable declarations. (I ran norminette on not-aligned global vars and confirm that it returned a norm error.) |
You should install
You're missing A way to fix this issue for future user would be to have our own |
And thank you for clarifying the alignment rules for me, I'll try to implement those. |
I checked the clang-format installation, but it's been already installed.
Is the version old? I'll try to install newer version tomorrow. I successfully ran on the host environment (M1Mac) (I've been using ubuntu 20.04 docker container).
Thanks very much for working on this, even though you're not 42 student any more.. |
The error This error does not occurs when I use the one from PyPI. |
Aaaah, I need to have an executable per OS **and** architecture, makes sense. Thank you very much
Jan 10, 2022 02:37:26 keyhr ***@***.***>:
… The error *'/lib64/ld-linux-x86-64.so.2': No such file or directory* seems to be happening because the clang-format binary attempts to link to the x86-64-native ld, while the running ubuntu is a native Arm image.
https://stackoverflow.com/questions/68630526/lib64-ld-linux-x86-64-so-2-no-such-file-or-directory-error
—
Reply to this email directly, view it on GitHub[#17 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AGBTCVO2J4PWCNJOFVIH44DUVIZ5FANCNFSM5LRMOTIA].
Triage notifications on the go with GitHub Mobile for iOS[https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675] or Android[https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub].
You are receiving this because you commented. [data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAYAAADjVADoAAAABHNCSVQICAgIfAhkiAAAACdJREFUeJztwQENAAAAwqD3T20PBxQAAAAAAAAAAAAAAAAAAAAA8GNEUgABIcqYqQAAAABJRU5ErkJggg==###24x24:true###][Tracking image][https://github.com/notifications/beacon/AGBTCVMU32HPACLXN5A5HJLUVIZ5FA5CNFSM5LRMOTIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHQOC4DI.gif]
|
Problem
According to norm, (III.3 functions in en.norm.pdf)
But this formatter inserts multiple tabulations as follows (2 tabs between int and main):
Expected formats:
The text was updated successfully, but these errors were encountered: