> > Here are a couple of anonymous examples from the mailing list: > > An infrequent contributor got minor coding style suggestions to a patch, > although the coding style was similar to that of a closely related function > in the same library, but not perfectly matching the official coding style. I > think we could be more lax about coding style, except if the coding style > directly violates automatic coding style validation tools. > > Another infrequent contributor got patch style feedback about a small patch, > suggesting to split it up into three patches. The official contributing guide > says that small changes should be kept together in the same patch. The patch > in question could be considered three bug fixes, so splitting it up might be > appropriate, or it could be considered fixing three variations of the same > bug, so keeping it together as one would be appropriate. I think we could be > more lax about patch style, except if the patches are completely > incomprehensible. >
A lot of patch style can be fixed automatically through clang-format. Please find below the Linux kernel documentation for its clang-format and usage. https://www.kernel.org/doc/html/latest/process/clang-format.html https://github.com/torvalds/linux/blob/master/.clang-format Maybe we could add .clang-format file for DPDK. I have been using the following clang-format configuration for DPDK[1] May be for once, we need to fix the coding standard issue with the existing codebase using clang-format. [1] "{ BasedOnStyle: LLVM, IndentWidth: 8, TabWidth: 8, UseTab: Always, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 80, AllowShortFunctionsOnASingleLine: false, AlwaysBreakAfterReturnType: AllDefinitions, ColumnLimit: 80, ConstructorInitializerAllOnOneLineOrOnePerLine: true, ConstructorInitializerIndentWidth: 8, ContinuationIndentWidth: 8, BreakBeforeBraces: Linux, AllowShortBlocksOnASingleLine: false, AlignConsecutiveAssignments: false, AlignEscapedNewlines: Right, AlignConsecutiveMacros : true, MaxEmptyLinesToKeep : 1, Cpp11BracedListStyle : true, AlignTrailingComments : true, ForEachMacros: ['STAILQ_FOREACH', 'rte_graph_foreach_node', 'TAILQ_FOREACH', 'RTE_ETH_FOREACH_DEV']}",