mm
mm copied to clipboard
Format Script Update
Brings over the updated format.sh from OoT that actually checks you have clang-tidy, along with some new clang-tidy options to force function definitions and declarations to be consistent. Also ran it across the whole repo.
Yeah, most of the renaming come from clang-tidy itself, but I did make two intentional changes that I noticed
void EnItem00_DrawHeartContainer(EnItem00* actor, PlayState* play)->void EnItem00_DrawHeartContainer(EnItem00* this, PlayState* play)void ObjRaillift_UpdatePosition(ObjRaillift* this, s32 idx)->void ObjRaillift_UpdatePosition(ObjRaillift* this, s32 index)
Going to draft this. Want to to see what happens with https://github.com/zeldaret/oot/pull/1331 and if we should ~~steal~~, I mean ask nicely if we can use it.
Okay this should be good to go again. Would recommend just trying out the new script if you haven't already.
Is this PR still waiting for the agents to be updated?
Is this PR still waiting for the agents to be updated?
I believe we are still waiting on Kenix's agent.
Jenkins is complaining there are unformatted files, but I can't reproduce the problem locally. Shouldn't this be using a specific clang format version?
Jenkins is complaining there are unformatted files, but I can't reproduce the problem locally. Shouldn't this be using a specific clang format version?
Hmm, locally I see EnZos change due to clang-tidy (1 function declaration and define don't match). Curious what you did locally (though probably best to debug in discord). As for the other file, it looks like a core file??? That is weird.
Converting to draft again. For some reason Slug is coring when trying to run clang-apply-replacements, and would like to figure that out first.
FYI I made a PR with some fixes to format.py in oot (see zeldaret/oot#1387), and it will probably prevent that coring issue you ran into
Undrafted. Looks good again. Thanks Roman.
On Mac I had to add symlinks for clang-tidy and clang-apply-replacements (after installing all of llvm, unfortunately clang-tidy does not have its own distribution on homebrew), so we should add that to the tools document or the script's help.
$ brew install llvm
$ ln -s "$(brew --prefix llvm)/bin/clang-tidy" "/usr/local/bin/clang-tidy"
$ ln -s "$(brew --prefix llvm)/bin/clang-apply-replacements" "/usr/local/bin/clang-apply-replacements"
was the right thing according to the instructions I followed.
And I suppose I should note I'm on 15.0.0 and it didn't change anything, so seems fine from that PoV?