# SPDX-FileCopyrightText: 2022 The P4 Language Consortium
#
# SPDX-License-Identifier: Apache-2.0

---
Language: Cpp
BasedOnStyle: Google
IndentWidth: 4
FixNamespaceComments: true
ColumnLimit: 100
SpacesBeforeTrailingComments: 2
AccessModifierOffset: -3

IncludeBlocks: Regroup
# Force pointers to the type for C++.
DerivePointerAlignment: false
PointerAlignment: Right
Standard: c++20
IncludeCategories:
  # Matches common headers first and sorts them before project includes
  - Regex: '^<.+/.*\.h>'
    Priority: 2000
  - Regex: "^<.+/.*>"
    Priority: 4000
  - Regex: '^<.*\.h>'
    Priority: 1000
  - Regex: "^<.*>"
    Priority: 3000
  - Regex: "testgen/.*"
    Priority: 6000
  - Regex: ".*"
    Priority: 5000
IncludeIsMainRegex: '(_test)?$'
WhitespaceSensitiveMacros:
  - __VA_OPT__
...
