Skip to content

Commit

Permalink
updating readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Pawel Sagan committed May 15, 2021
1 parent 9d2e26d commit c0764fa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
5 changes: 2 additions & 3 deletions verilog/analysis/verilog_linter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <memory>
#include <sstream>
#include <string>
#include <string_view>
#include <utility>
#include <vector>

Expand Down Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down
16 changes: 16 additions & 0 deletions verilog/tools/lint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c0764fa

Please sign in to comment.