diff --git a/verilog/analysis/checkers/constraint_name_style_rule.cc b/verilog/analysis/checkers/constraint_name_style_rule.cc index dfe13ecc2..eb13b75e1 100644 --- a/verilog/analysis/checkers/constraint_name_style_rule.cc +++ b/verilog/analysis/checkers/constraint_name_style_rule.cc @@ -44,7 +44,7 @@ VERILOG_REGISTER_LINT_RULE(ConstraintNameStyleRule); static constexpr absl::string_view kMessage = "Constraint names must by styled with lower_snake_case and end with _c."; -const LintRuleDescriptor& ConstraintNameStyleRule::GetDescriptor() { +const LintRuleDescriptor &ConstraintNameStyleRule::GetDescriptor() { static const LintRuleDescriptor d{ .name = "constraint-name-style", .topic = "constraints", @@ -55,13 +55,13 @@ const LintRuleDescriptor& ConstraintNameStyleRule::GetDescriptor() { return d; } -static const Matcher& ConstraintMatcher() { +static const Matcher &ConstraintMatcher() { static const Matcher matcher(NodekConstraintDeclaration()); return matcher; } -void ConstraintNameStyleRule::HandleSymbol(const verible::Symbol& symbol, - const SyntaxTreeContext& context) { +void ConstraintNameStyleRule::HandleSymbol(const verible::Symbol &symbol, + const SyntaxTreeContext &context) { verible::matcher::BoundSymbolManager manager; if (ConstraintMatcher().Matches(symbol, &manager)) { // Since an out-of-line definition is always followed by a forward @@ -72,7 +72,7 @@ void ConstraintNameStyleRule::HandleSymbol(const verible::Symbol& symbol, return; } - const auto* identifier_token = + const auto *identifier_token = GetSymbolIdentifierFromConstraintDeclaration(symbol); if (!identifier_token) return; diff --git a/verilog/analysis/checkers/constraint_name_style_rule.h b/verilog/analysis/checkers/constraint_name_style_rule.h index 277da1eda..ebdd4b1f7 100644 --- a/verilog/analysis/checkers/constraint_name_style_rule.h +++ b/verilog/analysis/checkers/constraint_name_style_rule.h @@ -33,10 +33,10 @@ class ConstraintNameStyleRule : public verible::SyntaxTreeLintRule { public: using rule_type = verible::SyntaxTreeLintRule; - static const LintRuleDescriptor& GetDescriptor(); + static const LintRuleDescriptor &GetDescriptor(); - void HandleSymbol(const verible::Symbol& symbol, - const verible::SyntaxTreeContext& context) final; + void HandleSymbol(const verible::Symbol &symbol, + const verible::SyntaxTreeContext &context) final; verible::LintRuleStatus Report() const final;