Retoor software development Projects Research SearchXNG
Register Sign In

14 lines
426 B
Nim
Raw Normal View History

feat: add initial validatrix project with multi-language validator framework Establish the Validatrix source code validation framework in Nim, including core detection, tokenization, and validation infrastructure for 10 languages (bash, HTML, JavaScript, Jinja, JSON, Nim, PHP, Python, TOML, YAML). The initial commit introduces the main validatrix.nim entry point with public API (validateSource, validateFile, inspectSource), a comprehensive test suite with per-language test files, build configuration via Makefile and .nimble, detailed LESSONS_LEARNED.md documenting 14 bug classes found during development, and a .gitignore excluding compiled binaries, logs, and build artifacts. The detector module provides extension-to-flavor mapping for 40+ file extensions and content-based language detection, while the debug module supports conditional compilation with -d:validatrixDebug for detailed tokenization logging.
2026-07-08 06:25:59 +02:00
## Mixed template file (Jinja + HTML) validator tests.
import std/[unittest, strutils]
import ../src/validatrix
suite "Mixed File Validator":
test "validateFile on .html.j2 mixed file":
let result = validateFile("tests/fixtures/mixed/template.html.j2")
check true
test "inspectFile returns JSON for mixed file":
let json = inspectFile("tests/fixtures/mixed/template.html.j2")
check json.kind == JObject
Reference in New Issue Copy Permalink
659ea7ebe0
nimcheck/tests/test_mixed.nim
Response time: 44ms
Mail Licenses API