@@ -104,7 +104,8 @@ def validate_examples(content: str) -> List[str]:
104
104
# Check for bash code examples
105
105
bash_examples = re .findall (r'```bash(.*?)```' , content , re .DOTALL )
106
106
if len (bash_examples ) < 2 :
107
- errors .append (f"Should have at least 2 bash code examples (found { len (bash_examples )} )" )
107
+ if len (bash_examples ) < MIN_BASH_EXAMPLES :
108
+ errors .append (f"Should have at least { MIN_BASH_EXAMPLES } bash code examples (found { len (bash_examples )} )" )
108
109
109
110
# Check for influxdb3 commands in examples
110
111
has_create_trigger = any ('influxdb3 create trigger' in ex for ex in bash_examples )
@@ -165,7 +166,8 @@ def validate_troubleshooting(content: str) -> List[str]:
165
166
solution_count = section_content .count ('**Solution:' ) + section_content .count ('Solution:' )
166
167
167
168
if issue_count < 2 :
168
- errors .append ("Troubleshooting should include at least 2 documented issues" )
169
+ if issue_count < MIN_TROUBLESHOOTING_ISSUES :
170
+ errors .append (f"Troubleshooting should include at least { MIN_TROUBLESHOOTING_ISSUES } documented issues" )
169
171
if issue_count > solution_count :
170
172
errors .append ("Each troubleshooting issue should have a corresponding solution" )
171
173
@@ -238,7 +240,7 @@ def validate_readme(readme_path: Path) -> Tuple[List[str], List[str]]:
238
240
239
241
# Check for optional but recommended sections
240
242
for section in OPTIONAL_SECTIONS :
241
- if section not in content and section not in [ "### Debugging tips" , "### Performance considerations" ] :
243
+ if section not in content and section not in IGNORED_OPTIONAL_SECTIONS :
242
244
warnings .append (f"Consider adding '{ section } ' section" )
243
245
244
246
# Check for template remnants
0 commit comments