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

Apply astyle #408

Merged
merged 4 commits into from
Sep 13, 2023
Merged

Apply astyle #408

merged 4 commits into from
Sep 13, 2023

Conversation

zcsahok
Copy link
Member

@zcsahok zcsahok commented Sep 10, 2023

Follow-up from #398 - consistently applying astyle to all source files. (src/*.[ch])

Some specially formatted comments are protected using INDENT-OFF/ON.

Trailing comments in main.c moved before the definition they to.

@zcsahok
Copy link
Member Author

zcsahok commented Sep 10, 2023

The following checksum stays invariant after astyle:

$ cat src/*.[ch] | tr -d ' \t\n' | md5sum
4b07abb970a4164588fabb9723365bf2  -

(MD5 of all files with whitespace and newlines removed)

@airween
Copy link
Member

airween commented Sep 11, 2023

Thanks Zoli, nice work.

@airween
Copy link
Member

airween commented Sep 11, 2023

I was wondering if we should force the use of astyle, eg. put a small script into the workflow what format the committed code and diff it with the original.

@zcsahok
Copy link
Member Author

zcsahok commented Sep 12, 2023

A check step could be surely added to the actions. Thanks for the idea.

@zcsahok
Copy link
Member Author

zcsahok commented Sep 13, 2023

The check fails if there are files to be formatted. The output provides the list of affected files.
image

@airween
Copy link
Member

airween commented Sep 13, 2023

LGTM, thanks!

@zcsahok zcsahok merged commit 5fa4733 into Tlf:master Sep 13, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants