Files
probo/.cursor/rules/template-files.mdc
Émile Ré 8f8f09008a Version Cursor rules
Track .cursor/rules/ in git so coding conventions are shared
across the team. Everything else under .cursor/ stays ignored.

Signed-off-by: Émile Ré <emile@probo.com>
2026-05-19 14:10:39 +04:00

30 lines
657 B
Plaintext

---
description: Template file naming and conventions
globs: "**/*.tmpl"
alwaysApply: false
---
# Template files
See full guide: `contrib/claude/file-naming.md`
## Naming convention
Template files use the extension pattern `<name>.<output-ext>.tmpl`:
```
pkg/trust/sitemap.xml.tmpl
pkg/cookiebanner/prompts/tracker_identification.txt.tmpl
pkg/probo/templates/risk_list.json.tmpl
```
## Dynamic values over hardcoded lists
Never hardcode enum values or source-of-truth lists in template text. Use a placeholder and substitute at runtime:
```
Use one of: {{.Categories}}.
```
Use `strings.Replace` (single placeholder) or `text/template` (multiple).