From 11a9ee14fe6dc499b73decbe54e2783b3377a879 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Tue, 12 Sep 2017 15:42:37 -0700 Subject: [PATCH] Enforce clang-format for c-like sources on Travis (flutter/engine#4089) * Enforce clang-format for c-like sources on Travis * Edit CONTRIBUTING,md * review feedback: * ++ * ++ * ++ --- engine/src/flutter/.travis.yml | 1 + engine/src/flutter/CONTRIBUTING.md | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/engine/src/flutter/.travis.yml b/engine/src/flutter/.travis.yml index 1ed00e9bf1..c72c15b6a6 100644 --- a/engine/src/flutter/.travis.yml +++ b/engine/src/flutter/.travis.yml @@ -6,3 +6,4 @@ before_script: script: - ./travis/build.sh - ./travis/test.sh + - ./travis/format.sh diff --git a/engine/src/flutter/CONTRIBUTING.md b/engine/src/flutter/CONTRIBUTING.md index 5466bff1c3..d0c7030316 100644 --- a/engine/src/flutter/CONTRIBUTING.md +++ b/engine/src/flutter/CONTRIBUTING.md @@ -201,11 +201,13 @@ To start working on a patch: * Make sure you are in the `engine/src/flutter` directory. * `git fetch upstream` * `git checkout upstream/master -b name_of_your_branch` - * Hack away. Please peruse our - [style guides](https://flutter.io/style-guide/) and - [design principles](https://flutter.io/design-principles/) before - working on anything non-trivial. These guidelines are intended to - keep the code consistent and avoid common pitfalls. + * Hack away. + * Please peruse our [style guides](https://flutter.io/style-guide/) and + [design principles](https://flutter.io/design-principles/) before + working on anything non-trivial. These guidelines are intended to + keep the code consistent and avoid common pitfalls. + * C, C++, and Objective-C code should be formatted with `clang-format` before + submission (use `buildtools//clang/bin/clang-format --style=file -i`). * `git commit -a -m ""` * `git push origin name_of_your_branch`