1#
2# Copyright 2016 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17#
18# Below are some minor deviations from the default Google style to
19# accommodate for handling of the large legacy code base.
20#
21
22# AOSP is based on google style with some modification commented below
23BasedOnStyle: Google
24
25---
26Language: Cpp
27# AOSP ask for 4, but we are not ready to touch every single line
28# IndentWidth: 4 # vs 2
29ColumnLimit: 100 # vs 80
30ContinuationIndentWidth: 8 # vs 4
31AccessModifierOffset: -2 # vs -1 Should be -4 when updating IndentWidth to 4
32Standard: c++20 # vs Auto
33AllowShortIfStatementsOnASingleLine: Never # vs WithoutElse
34AllowShortLoopsOnASingleLine: false # vs true
35# AOSP suggest 1, but ask to follow clang-format settings. CppLint ask for 2
36# SpacesBeforeTrailingComments: 1 # vs 2
37
38# Allow clang-format to automatically fix more things
39RemoveSemicolon: true
40InsertBraces: true
41RemoveParentheses: ReturnStatement
42
43---
44Language: Java
45# Java format is handled by google-java-format
46DisableFormat: true
47