diff --git a/.clang-format b/.clang-format index 71a0c5098..2ba2f6dba 100644 --- a/.clang-format +++ b/.clang-format @@ -25,9 +25,9 @@ Language: 'Cpp' MaxEmptyLinesToKeep: '1' PointerAlignment: 'Right' SortIncludes: 'true' -SpaceAfterCStyleCast: 'true' +SpaceAfterCStyleCast: 'false' SpaceBeforeAssignmentOperators : 'true' -SpaceBeforeParens: 'Always' +SpaceBeforeParens: 'ControlStatements' SpaceInEmptyParentheses: 'false' SpacesInSquareBrackets: 'false' TabWidth: '8' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 01c483bb9..56b92c865 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,9 +22,9 @@ from the PackageKit Coding Style. * 8-space tabs for indentation -* Prefer lines of less than <= 80 columns +* Prefer lines of less than <= 100 columns -* 1-space between function name and braces (both calls and macro +* No spaces between function name and braces (both calls and macro declarations) * If function signature/call fits in a single line, do not break it @@ -39,7 +39,7 @@ from the PackageKit Coding Style. over-documenting the obvious. Here is an example of useless comment: // Fetch the document - fetch_the_document (); + fetch_the_document(); * Comments should not start with a capital letter or end with a full stop and should be C-style, not C++-style, e.g. `/* this */` not `// this` diff --git a/contrib/reformat-code.py b/contrib/reformat-code.py index b260c3090..7fb129a71 100755 --- a/contrib/reformat-code.py +++ b/contrib/reformat-code.py @@ -20,7 +20,7 @@ CLANG_DIFF_FORMATTERS = [ "clang-format-diff-13", "clang-format-diff", ] -FIXUPS = {"g_autoptr (": "g_autoptr(", "sizeof (": "sizeof(", "g_auto (": "g_auto("} +FIXUPS = {} def parse_args():