From cce3f3918493d400b9d9a3c5c0ceb5beec18bb90 Mon Sep 17 00:00:00 2001 From: Dietrich Epp Date: Fri, 5 Mar 2021 12:51:11 -0500 Subject: [PATCH] Clang format GitOrigin-RevId: 90772439cd008f07b4ead07f68dacf9594eb9d0e --- .clang-format | 22 ++++++++++++++++++++++ sync.c | 4 +++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..19be8b9 --- /dev/null +++ b/.clang-format @@ -0,0 +1,22 @@ +--- +BasedOnStyle: Google +AccessModifierOffset: -4 +AllowShortFunctionsOnASingleLine: Inline +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +DerivePointerAlignment: false +IncludeBlocks: Preserve +IncludeCategories: + - Regex: '^".*' + Priority: 1 + - Regex: '^<.*\.h>' + Priority: 3 + - Regex: '^<.*' + Priority: 2 +IndentCaseLabels: false +IndentWidth: 4 +PointerAlignment: Right +SpacesBeforeTrailingComments: 1 +Standard: Cpp11 +TabWidth: 4 +UseTab: AlignWithSpaces diff --git a/sync.c b/sync.c index 2b06db6..fbe95f9 100644 --- a/sync.c +++ b/sync.c @@ -53,7 +53,9 @@ static int list_dir(const char *dirpath) { if (err == fnfErr) { break; } - fprintf(stderr, "## Error: could not list directory '%s' (err = %d)\n", dirpath, err); + fprintf(stderr, + "## Error: could not list directory '%s' (err = %d)\n", + dirpath, err); continue; } ppath[ppath[0] + 1] = '\0';