Skip to content

Instantly share code, notes, and snippets.

@pganssle
Created August 9, 2019 14:19
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • 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
@tonysimpson
Copy link

Hi I'd like to borrow this for a project, can I put it under an MIT license?

@pganssle
Copy link
Author

@tonysimpson Go for it.

@tonysimpson
Copy link

@pganssle Thanks much appreciated!

@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