From c0764fa1cad5e882971ad3ba877035883d20d3d7 Mon Sep 17 00:00:00 2001 From: Pawel Sagan Date: Sat, 15 May 2021 02:22:26 +0200 Subject: [PATCH] updating readme --- verilog/analysis/verilog_linter.cc | 5 ++--- verilog/tools/lint/README.md | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/verilog/analysis/verilog_linter.cc b/verilog/analysis/verilog_linter.cc index b4efa0abc9..95c849f448 100644 --- a/verilog/analysis/verilog_linter.cc +++ b/verilog/analysis/verilog_linter.cc @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -334,7 +333,7 @@ absl::Status PrintRuleInfo(std::ostream* os, return absl::OkStatus(); } -static void appendCitation(CustomCitationMap& citations, +static void AppendCitation(CustomCitationMap& citations, absl::string_view rule_raw) { const size_t eq_pos = rule_raw.find(':'); if (!eq_pos || eq_pos == absl::string_view::npos) return; @@ -359,7 +358,7 @@ CustomCitationMap ParseCitations(absl::string_view text) { continue; } auto rule_subs = text.substr(rule_begin, rule_end - rule_begin); - appendCitation(citations, rule_subs); + AppendCitation(citations, rule_subs); rule_begin = rule_end + 1; rule_end = text.find('\n', rule_begin); } diff --git a/verilog/tools/lint/README.md b/verilog/tools/lint/README.md index e0a73c8128..4da35579dc 100644 --- a/verilog/tools/lint/README.md +++ b/verilog/tools/lint/README.md @@ -113,6 +113,22 @@ Additionally, the `--rules_config` flag can be used to read configuration stored in a file. The syntax is the same as above, except the rules can be also separated with the newline character. +## Custom citations + +The `--lint_rule_citations` flag allows to load custom description for specified rules. +It accepts the path to file with prepared configuration. +The file should contain the rule set with appropriate description. +The rules are separeted with newline sign. When new lines are desired, just escape them with `\` sign. + +### Example file configuration: + +``` +struct-union-name-style:multi\ +line\ +example +signal-name-style:single line example +``` + ## Waiving Lint Violations {#lint-waiver} ### In-file waiver comments