From 1ee19e45b1a871cea50881604d6fb14025e3050e Mon Sep 17 00:00:00 2001 From: "R. Kaleta" Date: Sun, 19 Jan 2020 21:49:17 +0100 Subject: [PATCH] Clang-format 9 --- .clang-format | 18 +++++++++++++++--- README.md | 14 ++++++++------ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/.clang-format b/.clang-format index e8bb793..7d5686f 100644 --- a/.clang-format +++ b/.clang-format @@ -1,17 +1,21 @@ -# VERSION 8 +# VERSION 9 AccessModifierOffset: -4 AlignAfterOpenBracket: Align AlignConsecutiveAssignments: false AlignConsecutiveDeclarations: false +AlignConsecutiveMacros: false AlignEscapedNewlines: DontAlign AlignOperands: true AlignTrailingComments: false +AllowAllArgumentsOnNextLine: false +AllowAllConstructorInitializersOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: false AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: None AllowShortIfStatementsOnASingleLine: false +AllowShortLambdasOnASingleLine: true AllowShortLoopsOnASingleLine: false AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: false @@ -37,11 +41,14 @@ ForEachMacros: [] IncludeBlocks: Merge IncludeCategories: # C Standard library - - Regex: '^' + - Regex: '^|' Priority: 1 - # C standard library + # C standard library (C++ style) - Regex: '^' Priority: 2 + # C standard library (C style) + - Regex: '^<(std(arg|def|int|io)|assert|(u|w)char|ctype|errno|fenv|float|inttypes|limits|locale|math|setjmp|signal|string|time|wctype)\.h>' + Priority: 2 # C++ standard library: input-output, exceptions, memory, threads - Regex: '^<(ios(fwd)?|(i|o|io|f|s)stream|streambuf|iomanip|exception|stdexcept|system_error|new|memory|atomic|thread|(shared_)?mutex|future|condition_variable)>' Priority: 3 @@ -60,6 +67,7 @@ IncludeCategories: # All custom headers - Regex: '^".*"' Priority: 8 +IncludeIsMainRegex: "$" IndentCaseLabels: true IndentPPDirectives: None IndentWidth: 4 @@ -69,11 +77,13 @@ MacroBlockBegin: '' MacroBlockEnd: '' MaxEmptyLinesToKeep: 1 NamespaceIndentation: All +NamespaceMacros: [] PointerAlignment: Middle ReflowComments: false SortIncludes: true SortUsingDeclarations: true SpaceAfterCStyleCast: false +SpaceAfterLogicalNot: false SpaceAfterTemplateKeyword: true SpaceBeforeAssignmentOperators: true SpaceBeforeCpp11BracedList: false @@ -89,5 +99,7 @@ SpacesInContainerLiterals: false SpacesInParentheses: false SpacesInSquareBrackets: false Standard: Cpp11 +StatementMacros: [] TabWidth: 4 +TypenameMacros: [] UseTab: Never diff --git a/README.md b/README.md index f3152db..2203f60 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,7 @@ Simple ICMP traceroute Traceroute shows a path through the Internet from your computer to a specified address. This implementation uses ICMP packages and raw sockets. ### Output format -When there are replies for *any* of the requests sent, then reply addresses are displayed with -average reply time with count of responses: +When there are replies for *any* of the requests sent, then reply addresses are displayed with average reply time with count of responses: ``` . -- () ``` @@ -25,9 +24,12 @@ When there are no replies, then a single asterisk character is displayed: Build process: + Linux-based operating system *((Debian testing))* -+ [CMake](https://cmake.org/) *((3.13.4))* -+ C++ 14 compiler *((g++ 9.2.1))* -+ [GNU Make](https://www.gnu.org/software/make) *((4.2.1))* ++ C++ compiler *((g++ 9.2.+))* ++ [CMake](https://cmake.org/) *((3.15.+))* ++ [GNU Make](https://www.gnu.org/software/make) *((4.2.+))* + +### Automated formatting ++ [Clang-format](https://releases.llvm.org/9.0.0/tools/clang/docs/ClangFormat.html) *((9.0.+))* ----- @@ -44,7 +46,7 @@ $ make ``` ## How to run? -**Make sure you've got ``sudo`` priviledges so as to use raw sockets! Otherwise traceroute won't work.** +**Make sure you've got `sudo` privileges so as to use raw sockets! Otherwise traceroute won't work.** Traceroute can be run directly using the executable file in the `bin` root directory: ```sh