Commit Graph

4 Commits

Author SHA1 Message Date
Weiliang Chen
4fa5824fa2 Update clang-format matching more of Chromium
This CL does one thing: disallow short if/loop becoming a single
line.

Skia style guide prefers to always have braces. Though always
have braces isn't achievable by clang-format, always breaking into
multiple lines can be set.




Bug: skia:
Change-Id: I70b504dea01b4c916901ea2247ac0e052d468051
Reviewed-on: https://skia-review.googlesource.com/128688
Commit-Queue: Weiliang Chen <weiliangc@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-05-23 18:04:41 +00:00
Brian Salomon
c083e4f586 Mark flatennable macros as block beginning/ending in .clang-format
Change-Id: I08e907cd5051d9f8cd97cdd773f9ff326cc6a0d8
Reviewed-on: https://skia-review.googlesource.com/6739
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-01-09 15:31:36 +00:00
Brian Salomon
544851b59b Change ConstructorInitializerWidth in .clang-format from 4 to 8
We aren't consistent about this but having it at 4 seems to be causing style churn in code I've been editting recently. Also I prefer something other than 4 so that initalizers don't align with the constructor body.

BUG=skia:

Change-Id: I6ae850c34324e792dfd717f449634abcc7be010b
Reviewed-on: https://skia-review.googlesource.com/6030
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-14 15:00:48 +00:00
Brian Salomon
b4a24e57c0 Add .clang-format file to include/gpu src/gpu
Change-Id: Ie686f043f4b3a0a2bbd7ab38cf6bab53bb825a79
Reviewed-on: https://skia-review.googlesource.com/5651
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-08 15:19:15 +00:00