You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: integrate html2rss validate CLI and add editor schema support
- CI: bump actions/checkout and actions/setup-node to v4; add "Validate
configs" step to the lint job using `make validate`
- Makefile: add `validate` target (html2rss validate over all configs),
add `schema` target (html2rss schema --write); include validate in the
default goal; drop obsolete migrate-tests/restore-tests targets whose
backing script no longer exists; fix double-space in prettier invocation
- README: add Validation section documenting `make validate` and the
single-file CLI; add Editor Setup section explaining how to generate
schema/html2rss-config.schema.json and use it in VS Code or any
yaml-language-server editor via the modeline comment
- .vscode/settings.json: associate generated schema with all configs so
VS Code + YAML extension provides inline validation automatically
- .gitignore: exclude /schema/ (generated artifact)
https://claude.ai/code/session_01MYdMDpKySqfU1E3qgdikoe
Copy file name to clipboardExpand all lines: README.md
+38-1Lines changed: 38 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,18 @@ channel:
40
40
41
41
The `type` field specifies the parameter type (currently only `string` is supported), and `default` provides the default value when no parameter is explicitly provided.
42
42
43
+
## Validation
44
+
45
+
Validate configs against the html2rss schema before committing:
Uses **dynamic test generation** - no individual spec files needed!
@@ -55,10 +67,35 @@ make test-config CONFIG=github.com/releases.yml
55
67
make test-domain DOMAIN=github.com
56
68
```
57
69
58
-
**Adding new configs**: Just create the YAML file and run tests. No spec file needed.
70
+
**Adding new configs**: Just create the YAML file and run `make validate` then tests. No spec file needed.
59
71
60
72
**Config folder convention**: Place configs under the registrable domain folder (e.g., `example.com/` or `bbc.co.uk/`). Legacy subdomain folders (e.g., `news.example.com/`) are allowed but not preferred.
61
73
74
+
## Editor Setup (JSON Schema)
75
+
76
+
Get inline validation and autocompletion when editing configs in your IDE.
77
+
78
+
**Step 1** — Generate the schema from the installed gem:
79
+
80
+
```bash
81
+
make schema
82
+
# writes schema/html2rss-config.schema.json
83
+
```
84
+
85
+
**Step 2** — The included `.vscode/settings.json` automatically associates the schema
86
+
with all configs in `lib/html2rss/configs/`. Open the project in VS Code and the
0 commit comments