Maintain consistent formatting and use concise, standard syntax throughout the codebase. This includes several specific formatting rules:
#
symbol-n
instead of ! -z
)Examples:
// Good - no space after #
#pragma warning(push)
#pragma GCC diagnostic push
// Bad - space after #
# pragma warning(push)
# pragma GCC diagnostic push
// Good - concise string concatenation
auto path = binary_directory + "/" + filename;
// Bad - verbose string construction
auto path = binary_directory + std::string("/") + std::string(filename);
# Good - concise test operator
if [[ -n "$variable" ]]; then
# Bad - verbose test combination
if [[ ! -z "$variable" ]]; then
These formatting preferences improve code readability and maintain consistency across different languages and contexts in the codebase.
Enter the URL of a public GitHub repository