Skip to content

Conversation

@FintasticMan
Copy link
Member

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

@github-actions
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

*.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
@mark9064
Copy link
Member

mark9064 commented Jun 2, 2025

Now I look at this, isn't clang-tidy just completely broken

@mark9064
Copy link
Member

mark9064 commented Jun 3, 2025

A working clang-tidy invocation: clang-tidy -p build $($ARM_NONE_EABI_TOOLCHAIN_PATH/bin/arm-none-eabi-g++ -E -Wp,-v -xc++ /dev/null 1>/dev/null 2>&1 | grep ' /' | sed 's/ \//\//' | xargs realpath | sed 's/^/-extra-arg=-isystem/' | tr '\n' ' ') src/main.cpp

@mark9064
Copy link
Member

mark9064 commented Jun 5, 2025

Should probably link an explanation for that: llvm/llvm-project#53468

This was referenced Jun 17, 2025
@mark9064 mark9064 modified the milestones: 1.16.0, 1.17.0 Nov 8, 2025
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

3 participants