Commit Graph

7 Commits

Author SHA1 Message Date
Corentin Wallez 4c35101b9c PRESUBMIT.py: Add formatting checks.
GN files are checked using the canned presubmit check but we cannot do
the same for C/C++ files: the canned check uses git cl format which can
only use clang-format 5.0 and requires formatting of all the source
code.

Instead we write our own clang-format check, reusing the script that
checks formatting on Travis. To have a recent version of clang-format we
import one from a helper repo.

This also fix a formatting error in .gn and adds licenses to the
clang-format linting scripts.

Change-Id: I4d8208472a8a6bd32ae3ef41c3145abf270a4c37
2018-09-11 08:06:36 -04:00
Corentin Wallez ff9626c751 travis_lint_format: skip deleted files 2018-07-25 11:27:55 +02:00
Stephen White 1ec5782bff Fix travis lint script (again).
Don't error out if there are no files to format.
2018-04-28 00:03:53 -04:00
Stephen White 6d90e01858 Expand allowable formats for color attachments.
Don't assert on color formats which can be cleared with a
floating-point clear value.
So far, these are { unorm } x { r, rg, rgba, bgra }.
Fix linter error when no files to check.
2018-04-13 11:53:12 -04:00
Corentin Wallez 8828f2ad82 Don't check formatting on generator/ 2018-04-06 16:03:57 -04:00
Corentin Wallez 234111c379 Give up on formatting tests and examples
clang-format really doesn't like the builder pattern. We can re-enable
it when we get rid of it.
2018-02-12 15:19:11 -05:00
Corentin Wallez e3b1f51c04 Add travis hook to check formatting 2017-11-28 16:18:39 -05:00