mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 15:00:13 +01:00
The Carbon style guide prefers `const` to be on the left wherever possible, and also has a de-facto standard for specifier order. Since the order of specifiers and qualifiers tends to become a part of muscle-memory, deferring the checking of this to tooling should lift a small burden on both contributors and reviewers. --------- Co-authored-by: Carbon Infra Bot <carbon-external-infra@google.com>
29 lines
936 B
YAML
29 lines
936 B
YAML
# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
# Exceptions. See /LICENSE for license information.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
---
|
|
BasedOnStyle: Google
|
|
AllowShortBlocksOnASingleLine: 'false'
|
|
AllowShortIfStatementsOnASingleLine: Never
|
|
AllowShortLoopsOnASingleLine: 'false'
|
|
DerivePointerAlignment: 'false'
|
|
ExperimentalAutoDetectBinPacking: 'false'
|
|
FixNamespaceComments: 'true'
|
|
InsertBraces: 'true'
|
|
PointerAlignment: Left
|
|
# We abuse control macros for formatting other kinds of macros.
|
|
SpaceBeforeParens: ControlStatementsExceptControlMacros
|
|
IfMacros:
|
|
[
|
|
'CARBON_DEFINE_RAW_ENUM_CLASS',
|
|
'CARBON_DEFINE_ENUM_CLASS_NAMES',
|
|
'CARBON_DEFINE_RAW_ENUM_MASK',
|
|
'CARBON_DEFINE_ENUM_MASK_NAMES',
|
|
'CARBON_KIND_SWITCH',
|
|
]
|
|
StatementMacros: ['ABSTRACT']
|
|
QualifierAlignment: Custom
|
|
QualifierOrder:
|
|
[inline, static, friend, constexpr, const, volatile, restrict, type]
|