Home | History | Annotate | Download | only in recovery
      1 # bootable/recovery project uses repohook to apply `clang-format` to the changed lines, with the
      2 # local style file in `.clang-format`. This will be triggered automatically with `repo upload`.
      3 # Alternatively, one can stage and format a change with `git clang-format` directly.
      4 #
      5 #   $ git add <files>
      6 #   $ git clang-format --style file
      7 #
      8 # Or to format a committed change.
      9 #
     10 #   $ git clang-format --style file HEAD~1
     11 #
     12 # `--style file` will pick up the local style file in `.clang-format`. This can be configured as the
     13 # default behavior for bootable/recovery project.
     14 #
     15 #   $ git config --local clangFormat.style file
     16 #
     17 # Note that `repo upload` calls the `clang-format` binary in Android repo (i.e.
     18 # `$ANDROID_BUILD_TOP/prebuilts/clang/host/linux-x86/clang-stable/bin/clang-format`), which might
     19 # give slightly different results from the one installed in host machine (e.g.
     20 # `/usr/bin/clang-format`). Specifying the file with `--binary` will ensure consistent results.
     21 #
     22 #  $ git clang-format --binary \
     23 #      /path/to/aosp-master/prebuilts/clang/host/linux-x86/clang-stable/bin/clang-format
     24 #
     25 # Or to do one-time setup to make it default.
     26 #
     27 #   $ git config --local clangFormat.binary \
     28 #       /path/to/aosp-master/prebuilts/clang/host/linux-x86/clang-stable/bin/clang-format
     29 #
     30 
     31 BasedOnStyle: Google
     32 AllowShortBlocksOnASingleLine: false
     33 AllowShortFunctionsOnASingleLine: Empty
     34 AllowShortIfStatementsOnASingleLine: true
     35 
     36 ColumnLimit: 100
     37 CommentPragmas: NOLINT:.*
     38 DerivePointerAlignment: false
     39 IndentWidth: 2
     40 PointerAlignment: Left
     41 TabWidth: 2
     42 UseTab: Never
     43 
     44 Cpp11BracedListStyle: false
     45