mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-05-16 07:51:41 -04:00
## Summary Replaces the Python `propscheck.py` validation script with TypeScript code that: - Uses a testable validator module (`lib/properties-validator.ts`) - Has comprehensive unit tests (71 tests in `test/properties-validation-tests.ts`) - Integrates with the existing property loading infrastructure - Runs as part of the normal test suite ## Changes - **New validator module** (`lib/properties-validator.ts`): - Raw file validation: duplicate keys, empty list elements, typos, suspicious paths - Orphan detection: compilers, groups, formatters, tools, libraries - Cross-file duplicate compiler ID detection - Disabled allowlist support (`# Disabled: id1 id2`) - Invalid property format detection (leverages `parseProperties()` with new `collectErrors` option) - Missing compilers list detection for language files - **Property library enhancement** (`lib/properties.ts`): - Added `collectErrors` option to `parseProperties()` for structured error collection - **New npm script**: `npm run test:props` for quick property validation - Set `CHECK_LOCAL_PROPS=true` to include `.local.properties` files - **Updated references**: - CI workflow no longer calls propscheck.py - Pre-commit hook uses `npm run test:props` - CE Properties Wizard uses the new validation - **Removed**: `etc/scripts/util/propscheck.py` and `propschecktest.py` ## Test plan - [x] All 71 unit tests pass - [x] Integration tests validate real config files - [x] `npm run test:props` works standalone - [x] CE Properties Wizard validation works - [x] CI passes 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>