# Keep this file in sync with .editorconfig

# GNU style
--style=gnu

# convert tabs into spaces
--convert-tabs

# lines indented using 2 spaces
--indent=spaces=2

# add spaces around commas
--pad-comma

# add spaces around arithmetic, logical, and assignment operators
--pad-oper

# add space between keywords and '(' in control statements
--pad-header

# max line lenght is 120 chars
--max-code-length=120

# maximum number of spaces allowed to indent a continuation line inside a statement
# effectively limiting how far a long wrapped line could be pushed right.
# This is dropped in v3.2
# --max-instatement-indent=60
--max-continuation-indent=60

# pointer is aligned to the name of the variable
--align-pointer=name

# check files recursively in folder
--recursive

# do not create backups of formatted files
--suffix=none

# exclude folders && files
# do not check submodules and third party code
--ignore-exclude-errors
--exclude="lib/ivykis"
--exclude="modules/cloud-auth/jwt-cpp"
--exclude="modules/grpc/protos/opentelemetry-proto"
# TODO: inherited exclusions, check why these are excluded earlier
# --exclude="lib/compat/strcasestr.c"
# --exclude="dbld"

# allow opening curly bracket in the same line as namespace e.g.: `namespace foobar {`
--attach-namespaces
