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

clang-format: Update to 16 #2139

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

clang-format: Update to 16 #2139

wants to merge 1 commit into from

Conversation

FintasticMan
Copy link
Member

As discussed in #2127.
I've also updated the clang-format options to be compatible, and sorted the options.

Copy link

github-actions bot commented Oct 9, 2024

Build size and comparison to main:

Section Size Difference
text 374512B -16B
data 948B 0B
bss 63488B 0B

@FintasticMan FintasticMan force-pushed the update-clang-format branch 5 times, most recently from c34df9a to 88e5c64 Compare October 10, 2024 10:09
@FintasticMan
Copy link
Member Author

Sorry for the force push spam 😅. GitHub doesn't have an easy way to test CI locally, so I just did it in this PR. The failing clang-tidy test is because the infinitime-build container still uses Ubuntu 22.04. I think the reason we use the docker container in that check is to generate the compile_commands.json file that clang-tidy uses. Should I also update the docker container in this PR?

@mark9064
Copy link
Member

Yeah may as well do it all in one go I think, it makes sense to do the upgrade atomically

@FintasticMan
Copy link
Member Author

I've actually just thought that we don't necessarily need to update clang-tidy at the same time as clang-format, they don't interact at all. I might just revert the clang-tidy version bump and keep this PR to only updating clang-format.

Copy link
Member

@mark9064 mark9064 left a comment

Choose a reason for hiding this comment

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

LGTM. It makes sense to keep the clang tooling at the same version to me though - tools get installed at the same time so the versions will be the same on real systems. In what scenario would you have clang-format from clang 16 installed but clang-tidy from 14 - it seems like we'd be using a very strange configuration here

@@ -17,7 +17,7 @@ do
src/libs/*|src/FreeRTOS/*) continue ;;
*.cpp|*.h)
echo "::group::$file"
clang-tidy-14 -p build "$file" || true
clang-tidy-16 -p build "$file" || true
Copy link
Member

Choose a reason for hiding this comment

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

If clang-tidy isn't being updated, this should be undone right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh yeah, oops

@FintasticMan
Copy link
Member Author

I agree that clang-tidy 14 with clang-format 16 is a bit of a strange setup, but I think that it's fine for the interim while I get clang-tidy 16 working.

@FintasticMan FintasticMan linked an issue Oct 27, 2024 that may be closed by this pull request
1 task
@mark9064
Copy link
Member

Oh, what's up with clang-tidy 16?

@mark9064 mark9064 added the maintenance Background work label Nov 18, 2024
@mark9064 mark9064 added this to the 1.16.0 milestone Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Background work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve clang-format to check newlines at end of file
2 participants