Fix style guide errors

This commit is contained in:
Aaron Po
2026-04-11 23:43:35 -04:00
parent 56ec728ba7
commit 823599a96f
8 changed files with 30 additions and 28 deletions

View File

@@ -9,21 +9,23 @@ Checks: >
-google-runtime-references
CheckOptions:
# Enforce Google Naming Conventions
# Enforce Google Naming Conventions with valid clang-tidy strings
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.ClassMemberCase
value: snake_case
value: lower_case
- key: readability-identifier-naming.ClassMemberSuffix
value: _
- key: readability-identifier-naming.ClassCase
value: PascalCase
- key: readability-identifier-naming.FunctionCase
value: PascalCase
value: CamelCase
- key: readability-identifier-naming.StructCase
value: PascalCase
value: CamelCase
- key: readability-identifier-naming.VariableCase
value: snake_case
value: lower_case
- key: readability-identifier-naming.GlobalConstantCase
value: kPascalCase
value: CamelCase
- key: readability-identifier-naming.GlobalConstantPrefix
value: k
# Ensure C++20 Modernization
- key: modernize-make-unique.MakeSmartPtrFunction

View File

@@ -16,7 +16,7 @@
struct llama_model;
struct llama_context;
struct llama_sampler;
struct LlamaSampler;
/**
* @brief Data generator implementation backed by llama.cpp.
@@ -74,7 +74,7 @@ class LlamaGenerator final : public DataGenerator {
SamplerState(SamplerState&&) = delete;
SamplerState& operator=(SamplerState&&) = delete;
llama_sampler* chain = nullptr;
LlamaSampler* chain = nullptr;
};
/**

View File

@@ -44,18 +44,18 @@ class MockGenerator final : public DataGenerator {
*/
static std::size_t DeterministicHash(const Location& location);
inline static constexpr std::array<std::string_view, 18> kBreweryAdjectives =
static constexpr std::array<std::string_view, 18> kBreweryAdjectives =
{"Craft", "Heritage", "Local", "Artisan", "Pioneer", "Golden",
"Modern", "Classic", "Summit", "Northern", "Riverstone", "Barrel",
"Hinterland", "Harbor", "Wild", "Granite", "Copper", "Maple"};
inline static constexpr std::array<std::string_view, 18> kBreweryNouns = {
static constexpr std::array<std::string_view, 18> kBreweryNouns = {
"Brewing Co.", "Brewery", "Bier Haus", "Taproom", "Works",
"House", "Fermentery", "Ale Co.", "Cellars", "Collective",
"Project", "Foundry", "Malthouse", "Public House", "Co-op",
"Lab", "Beer Hall", "Guild"};
inline static constexpr std::array<std::string_view, 18>
static constexpr std::array<std::string_view, 18>
kBreweryDescriptions = {
"Handcrafted pale ales and seasonal IPAs with local ingredients.",
"Traditional lagers and experimental sours in small batches.",
@@ -90,14 +90,14 @@ class MockGenerator final : public DataGenerator {
"Destination taproom known for balanced IPAs and cocoa-rich "
"stouts."};
inline static constexpr std::array<std::string_view, 18> kUsernames = {
static constexpr std::array<std::string_view, 18> kUsernames = {
"hopseeker", "malttrail", "yeastwhisper", "lagerlane",
"barrelbound", "foamfinder", "taphunter", "graingeist",
"brewscout", "aleatlas", "caskcompass", "hopsandmaps",
"mashpilot", "pintnomad", "fermentfriend", "stoutsignal",
"sessionwander", "kettlekeeper"};
inline static constexpr std::array<std::string_view, 18> kBios = {
static constexpr std::array<std::string_view, 18> kBios = {
"Always chasing balanced IPAs and crisp lagers across local taprooms.",
"Weekend brewery explorer with a soft spot for dark, roasty stouts.",
"Documenting tiny brewpubs, fresh pours, and unforgettable beer "

View File

@@ -13,10 +13,10 @@
*/
struct BreweryResult {
/// @brief Brewery display name.
std::string name;
std::string name{};
/// @brief Brewery description text.
std::string description;
std::string description{};
};
#endif // BIERGARTEN_PIPELINE_INCLUDES_DATA_MODEL_BREWERY_RESULT_H_

View File

@@ -15,7 +15,7 @@
*/
struct EnrichedCity {
Location location;
std::string region_context;
std::string region_context{};
};
#endif // BIERGARTEN_PIPELINE_INCLUDES_DATA_MODEL_ENRICHED_CITY_H_

View File

@@ -13,25 +13,25 @@
*/
struct Location {
/// @brief City name.
std::string city;
std::string city{};
/// @brief State or province name.
std::string state_province;
std::string state_province{};
/// @brief ISO 3166-2 subdivision code.
std::string iso3166_2;
std::string iso3166_2{};
/// @brief Country name.
std::string country;
std::string country{};
/// @brief ISO 3166-1 country code.
std::string iso3166_1;
std::string iso3166_1{};
/// @brief Latitude in decimal degrees.
double latitude;
double latitude{};
/// @brief Longitude in decimal degrees.
double longitude;
double longitude{};
};
#endif // BIERGARTEN_PIPELINE_INCLUDES_DATA_MODEL_LOCATION_H_

View File

@@ -13,10 +13,10 @@
*/
struct UserResult {
/// @brief Username handle.
std::string username;
std::string username{};
/// @brief Short user biography.
std::string bio;
std::string bio{};
};
#endif // BIERGARTEN_PIPELINE_INCLUDES_DATA_MODEL_USER_RESULT_H_

View File

@@ -103,7 +103,7 @@ std::optional<ApplicationOptions> ParseArguments(const int argc,
const bool has_llm_params = !variables_map["temperature"].defaulted() ||
!variables_map["top-p"].defaulted() ||
!variables_map["top-k"].defaulted() ||
!variables_map["seed"].defaulted();
!variables_map["seed"].defaulted() = false;
if (use_mocked && has_llm_params) {
spdlog::warn(