Skip to content

feat: add config validation workflow and editor schema hints#286

Merged
gildesmarais merged 6 commits intomasterfrom
claude/add-validation-cli-inz0i
Mar 10, 2026
Merged

feat: add config validation workflow and editor schema hints#286
gildesmarais merged 6 commits intomasterfrom
claude/add-validation-cli-inz0i

Conversation

@gildesmarais
Copy link
Member

@gildesmarais gildesmarais commented Mar 10, 2026

Summary

  • add a fast bin/validate_configs workflow and wire make validate into CI
  • add YAML schema hints for editors via modelines, VS Code settings, and docs
  • pin Prettier with a lockfile and install Node dependencies with --ignore-scripts
  • skip changed-config fetch tests when a config diff only adds the schema modeline

Commit Stack

  • feat(devx): add config validation workflow
  • feat(config): add YAML schema hints for editors
  • fix(devx): pin prettier and harden config validation
  • fix(ci): skip schema-only changed config fetch tests

Notes

  • the changed-config CI helper is intentionally narrow: it only skips fetch tests for config files whose diff is limited to the added yaml-language-server schema comment

Verification

  • bundle exec ruby bin/validate_configs
  • bundle exec rspec
  • npm ci --ignore-scripts --no-fund --no-audit
  • ./node_modules/.bin/prettier --check lib/**/*.yml .github/**/*.yml README.md
  • ruby bin/rspec_changed_configs

@gildesmarais gildesmarais marked this pull request as draft March 10, 2026 17:08
@gildesmarais gildesmarais force-pushed the claude/add-validation-cli-inz0i branch from 1fa9843 to aaaf540 Compare March 10, 2026 17:17
@gildesmarais gildesmarais force-pushed the claude/add-validation-cli-inz0i branch from aaaf540 to 8a67725 Compare March 10, 2026 17:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates config validation via html2rss validate into the CI pipeline and developer workflow, adds JSON schema support for editor autocompletion, and modernizes the build tooling. It adds schema modeline comments to all YAML config files, introduces a validate Make target, pins prettier as a local dependency, and bumps GitHub Actions versions.

Changes:

  • Added validate and schema Make targets, a bin/validate_configs Ruby script, and a corresponding CI step; bumped actions/checkout and actions/setup-node to v4
  • Added yaml-language-server schema modeline to all YAML config files under lib/html2rss/configs/, with VS Code settings and extension recommendations for editor integration
  • Introduced package.json/package-lock.json with prettier as a local npm devDependency, replacing npx invocations with the local binary path

Reviewed changes

Copilot reviewed 54 out of 58 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/ruby.yml Bump action versions to v4; add npm ci and make validate steps
Makefile Add validate/schema targets; add validate to default goal; switch prettier from npx to local binary; fix double-space
bin/validate_configs New Ruby script to validate all YAML configs against html2rss schema
bin/setup Modernize setup script: add npm install, system tool checks, and usage hints
package.json / package-lock.json Pin prettier 3.8.1 as a local devDependency
.gitignore Exclude generated /schema/ directory
.vscode/settings.json / .vscode/extensions.json VS Code YAML schema association and extension recommendation
README.md Add Validation and Editor Setup (JSON Schema) documentation sections
lib/html2rss/configs/**/*.yml (47 files) Add schema modeline comment to all config files
lib/html2rss/configs/espn.com/f1.yml Schema modeline added, but also contains suspicious strategy: default and s: 'dfd' additions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +8 to +9
validate:
bundle exec ruby bin/validate_configs
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says "drop obsolete migrate-tests/restore-tests targets whose backing script no longer exists," but these targets (lines 42-52) are still present in the Makefile. The bin/migrate_to_dynamic_tests script referenced by migrate-tests doesn't exist, so running make migrate-tests will fail. These targets should be removed as stated in the PR description.

Copilot uses AI. Check for mistakes.
@gildesmarais gildesmarais changed the title feat: integrate html2rss validate CLI and add editor schema support feat: add config validation workflow and editor schema hints Mar 10, 2026
@gildesmarais gildesmarais marked this pull request as ready for review March 10, 2026 21:23
@gildesmarais gildesmarais marked this pull request as draft March 10, 2026 21:23
@gildesmarais gildesmarais marked this pull request as ready for review March 10, 2026 21:26
@gildesmarais gildesmarais merged commit 597881a into master Mar 10, 2026
7 checks passed
@gildesmarais gildesmarais deleted the claude/add-validation-cli-inz0i branch March 10, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants