Page MenuHome

Code quality: Enable SortedIncludes (work in progress)
Needs ReviewPublic

Authored by Dalai Felinto (dfelinto) on Tue, Feb 11, 2:04 PM.
This revision needs review, but there are no reviewers specified.



This includes two commits:

  • Cleanup: Fix forward declaration of headers
  • Clang-Format: Enable SortedIncludes

After this is finished and merged, we then run a make format, and commit the changes as well.

Right now it is not working for:

  • Cycles
  • Freestyle

Diff Detail

rB Blender
cleanup-headers-review (branched from master)
Build Status
Buildable 6578
Build 6578: arc lint + arc unit

Event Timeline

Header sorting is not going to work for the Cycles kernel. It's used to compile the entire kernel as a single file, and the order there matters.

I guess we can sprinkle some /* clang-format off */ in the code there, unless there is a way to disable this for entire directories.

Fixed for ghost, and sustom .clang-format without SortedInclude for Cycles and Freestyle

If it's just a handful of files, /* clang-format off */ seems preferable over copying the entire configuration.

Fix for Mac building

I was updating the patch based on buildbot and missed your replies.
I will try /* clang-format off */ here and there, good call.