Skip to content

Commit

Permalink
clang-format constraint_name_style_rule
Browse files Browse the repository at this point in the history
  • Loading branch information
IEncinas10 committed Nov 23, 2024
1 parent 5eb8aa3 commit 5de0df4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions verilog/analysis/checkers/constraint_name_style_rule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
Expand All @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions verilog/analysis/checkers/constraint_name_style_rule.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 5de0df4

Please sign in to comment.