File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ - When adding or modifying a command in the CLI, the .toml config file should be updated as well.
2+ - Every time there is a user facing change the @docs / should be updated according to @docs/CONTRIBUTING .md
3+ - When making a new rule you need to assign "NTX<seq >" code, always use the highest seq value that has yet not been used.
Original file line number Diff line number Diff line change 1+ # Documentation Contribution Guidelines
2+
3+ ## Adding New Rule Documentation
4+
5+ 1 . Create a new file in ` docs/rules/<rule-name>.md `
6+ 2 . Use this template:
7+
8+ ``` markdown
9+ # Rule Name
10+
11+ | Property | Value |
12+ | ----------| -------|
13+ | Rule Code | ` NTXN ` |
14+ | Severity | Warning/Style/Optimization/Important |
15+ | Configuration | ` param_name ` - Description (default: value) |
16+
17+ ## Background
18+ Brief explanation of why this rule exists.
19+
20+ ## Purpose
21+ What the rule detects or enforces.
22+
23+ ## Example
24+ ``` vyper
25+ # Non-compliant code
26+ ...
27+
28+ # Compliant code
29+ ...
30+ ```
31+
32+ ## Configuration
33+ ### pyproject.toml
34+ ``` toml
35+ [tool .natrix .rule_configs .RuleName ]
36+ param = " value"
37+ ```
38+
39+ ### Command Line
40+ ``` bash
41+ natrix --rule-config RuleName.param=value
42+ ```
43+ ```
44+
45+ 3 . ** Important** :
46+ - Only include the Configuration section if the rule has configurable parameters
47+ - Do not add arbitrary sections - stick to the template
48+ - Keep the structure consistent with existing rule documentation
49+
50+ 4 . Update ` docs/rules/index.md ` with the new rule entry
51+
52+ 5 . Add the rule to ` mkdocs.yml ` navigation:
53+ ``` yaml
54+ nav :
55+ - Rules :
56+ - Rule Name (NTXN) : rules/rule-name.md
57+ ` ` `
58+
59+ 6. Update ` docs/configuration.md` if the rule has configurable parameters
60+
61+ 7. Verify the documentation builds correctly :
62+ ` ` ` bash
63+ mkdocs build
64+ ` ` `
You can’t perform that action at this time.
0 commit comments