Ensure new code follows established patterns, conventions, and standards already present in the codebase. This includes adhering to parameter ordering conventions, maintaining existing code patterns, using consistent header formatting, and reusing existing utilities rather than creating duplicates.
Ensure new code follows established patterns, conventions, and standards already present in the codebase. This includes adhering to parameter ordering conventions, maintaining existing code patterns, using consistent header formatting, and reusing existing utilities rather than creating duplicates.
Key areas to check:
Example of good consistency:
// Follow established parameter ordering
string_t(ArenaAllocator &arena, const char *data, const uint32_t len) // Good
string_t(const char *data, const uint32_t len, ArenaAllocator &arena) // Inconsistent
// Use standard header format
//===----------------------------------------------------------------------===//
// DuckDB
//
// duckdb/common/types/string.hpp
//
//===----------------------------------------------------------------------===//
This approach reduces cognitive load for developers, makes the codebase more predictable, and prevents the accumulation of inconsistent patterns over time.
Enter the URL of a public GitHub repository