Skip to content

Instantly share code, notes, and snippets.

@pganssle
Created August 9, 2019 14:19
Show Gist options
  • Save pganssle/0e3a5f828b4d07d79447f6ced8e7e4db to your computer and use it in GitHub Desktop.
Save pganssle/0e3a5f828b4d07d79447f6ced8e7e4db to your computer and use it in GitHub Desktop.
Clang format style that approximates PEP 7
# A clang-format style that approximates Python's PEP 7
# Useful for IDE integration
BasedOnStyle: Google
AlwaysBreakAfterReturnType: All
AllowShortIfStatementsOnASingleLine: false
AlignAfterOpenBracket: Align
BreakBeforeBraces: Stroustrup
ColumnLimit: 79
DerivePointerAlignment: false
IndentWidth: 4
Language: Cpp
PointerAlignment: Right
ReflowComments: true
SpaceBeforeParens: ControlStatements
SpacesInParentheses: false
TabWidth: 4
UseTab: Never
@charris
Copy link

charris commented Aug 25, 2021

I've borrowed this for NumPy at numpy/numpy#19754. I don't see a license here, are you OK with the BSD-3-Clause License used by NumPy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment