2026-07-08 10:01:58 +02:00
|
|
|
# Nimcheck - Universal Source Code Validation Framework
|
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
|
|
|
# Makefile
|
|
|
|
|
|
|
|
|
|
NIMC = nim c
|
|
|
|
|
NIMC_MACROS =
|
|
|
|
|
SRC_DIR = src
|
|
|
|
|
TEST_DIR = tests
|
|
|
|
|
BIN_DIR = bin
|
|
|
|
|
|
|
|
|
|
.PHONY: all build test test-all test-nim test-python test-bash test-js test-php
|
|
|
|
|
.PHONY: test-html test-jinja test-json test-yaml test-toml test-mixed
|
|
|
|
|
.PHONY: debug lint clean rebuild coverage validate inspect help
|
|
|
|
|
|
|
|
|
|
all: build
|
|
|
|
|
|
|
|
|
|
# --- Build targets ---
|
|
|
|
|
|
|
|
|
|
build:
|
|
|
|
|
@mkdir -p $(BIN_DIR)
|
2026-07-08 10:01:58 +02:00
|
|
|
$(NIMC) $(NIMC_MACROS) --outdir:$(BIN_DIR) $(SRC_DIR)/nimcheck.nim
|
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
|
|
|
|
|
|
|
|
build-debug:
|
|
|
|
|
@mkdir -p $(BIN_DIR)
|
2026-07-08 10:01:58 +02:00
|
|
|
$(NIMC) -d:nimcheckDebug --outdir:$(BIN_DIR) $(SRC_DIR)/nimcheck.nim
|
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
|
|
|
|
|
|
|
|
# --- Test targets ---
|
|
|
|
|
|
|
|
|
|
test: test-all
|
|
|
|
|
|
|
|
|
|
test-all:
|
|
|
|
|
$(NIMC) -r $(TEST_DIR)/test_all.nim
|
|
|
|
|
|
|
|
|
|
test-nim:
|
|
|
|
|
$(NIMC) -r $(TEST_DIR)/test_nim.nim
|
|
|
|
|
|
|
|
|
|
test-python:
|
|
|
|
|
$(NIMC) -r $(TEST_DIR)/test_python.nim
|
|
|
|
|
|
|
|
|
|
test-bash:
|
|
|
|
|
$(NIMC) -r $(TEST_DIR)/test_bash.nim
|
|
|
|
|
|
|
|
|
|
test-js:
|
|
|
|
|
$(NIMC) -r $(TEST_DIR)/test_javascript.nim
|
|
|
|
|
|
|
|
|
|
test-php:
|
|
|
|
|
$(NIMC) -r $(TEST_DIR)/test_php.nim
|
|
|
|
|
|
|
|
|
|
test-html:
|
|
|
|
|
$(NIMC) -r $(TEST_DIR)/test_html.nim
|
|
|
|
|
|
|
|
|
|
test-jinja:
|
|
|
|
|
$(NIMC) -r $(TEST_DIR)/test_jinja.nim
|
|
|
|
|
|
|
|
|
|
test-json:
|
2026-07-08 10:19:01 +02:00
|
|
|
$(NIMC) -r $(TEST_DIR)/test_json_exhaustive.nim
|
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
|
|
|
|
|
|
|
|
test-yaml:
|
2026-07-08 10:19:01 +02:00
|
|
|
$(NIMC) -r $(TEST_DIR)/test_yaml_exhaustive.nim
|
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
|
|
|
|
|
|
|
|
test-toml:
|
2026-07-08 10:19:01 +02:00
|
|
|
$(NIMC) -r $(TEST_DIR)/test_toml_exhaustive.nim
|
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
|
|
|
|
|
|
|
|
test-mixed:
|
|
|
|
|
$(NIMC) -r $(TEST_DIR)/test_mixed.nim
|
|
|
|
|
|
|
|
|
|
# --- Debug mode ---
|
|
|
|
|
|
|
|
|
|
debug: build-debug
|
2026-07-08 10:01:58 +02:00
|
|
|
$(NIMC) -d:nimcheckDebug -r $(TEST_DIR)/test_all.nim
|
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
|
|
|
|
|
|
|
|
# --- Lint / static analysis ---
|
|
|
|
|
|
|
|
|
|
lint:
|
2026-07-08 10:01:58 +02:00
|
|
|
$(NIMC) --hints:on --warnings:on $(SRC_DIR)/nimcheck.nim
|
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
|
|
|
|
|
|
|
|
# --- Cleanup ---
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
|
rm -rf $(BIN_DIR)
|
|
|
|
|
rm -f $(SRC_DIR)/*.exe
|
|
|
|
|
rm -f $(SRC_DIR)/*.o
|
|
|
|
|
rm -f $(TEST_DIR)/*.exe
|
|
|
|
|
rm -f $(TEST_DIR)/*.o
|
|
|
|
|
find . -name '*.exe' -delete
|
|
|
|
|
find . -name '*.o' -delete
|
|
|
|
|
|
|
|
|
|
rebuild: clean build
|
|
|
|
|
|
|
|
|
|
# --- Coverage (requires nim-coverage) ---
|
|
|
|
|
|
|
|
|
|
coverage:
|
2026-07-08 10:01:58 +02:00
|
|
|
$(NIMC) -d:nimcheckCoverage -r $(TEST_DIR)/test_all.nim
|
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
|
|
|
|
|
|
|
|
# --- Validation command-line tool ---
|
|
|
|
|
|
|
|
|
|
validate: build
|
2026-07-08 10:01:58 +02:00
|
|
|
@echo "Usage: echo '<source>' | $(BIN_DIR)/nimcheck validate --flavor=<lang>"
|
|
|
|
|
@echo " $(BIN_DIR)/nimcheck validate --file=<path> [--flavor=<lang>]"
|
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
|
|
|
|
|
|
|
|
inspect: build
|
2026-07-08 10:01:58 +02:00
|
|
|
@echo "Usage: $(BIN_DIR)/nimcheck inspect --file=<path> [--flavor=<lang>]"
|
|
|
|
|
@echo " $(BIN_DIR)/nimcheck inspect --source=<code> --flavor=<lang>"
|
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
|
|
|
|
|
|
|
|
# --- Help ---
|
|
|
|
|
|
|
|
|
|
help:
|
2026-07-08 10:01:58 +02:00
|
|
|
@echo "Nimcheck - Universal Source Code Validation Framework"
|
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
|
|
|
@echo ""
|
|
|
|
|
@echo "Targets:"
|
|
|
|
|
@echo " build - Compile the library"
|
|
|
|
|
@echo " build-debug - Compile with debug mode"
|
|
|
|
|
@echo " test - Run all tests (alias for test-all)"
|
|
|
|
|
@echo " test-all - Run all tests"
|
|
|
|
|
@echo " test-nim - Run Nim-specific tests"
|
|
|
|
|
@echo " test-python - Run Python-specific tests"
|
|
|
|
|
@echo " test-bash - Run Bash-specific tests"
|
|
|
|
|
@echo " test-js - Run JavaScript-specific tests"
|
|
|
|
|
@echo " test-php - Run PHP-specific tests"
|
|
|
|
|
@echo " test-html - Run HTML-specific tests"
|
|
|
|
|
@echo " test-jinja - Run Jinja-specific tests"
|
|
|
|
|
@echo " test-json - Run JSON-specific tests"
|
|
|
|
|
@echo " test-yaml - Run YAML-specific tests"
|
|
|
|
|
@echo " test-toml - Run TOML-specific tests"
|
|
|
|
|
@echo " test-mixed - Run mixed file tests"
|
|
|
|
|
@echo " debug - Run all tests in debug mode"
|
|
|
|
|
@echo " lint - Compile with full hints/warnings"
|
|
|
|
|
@echo " clean - Remove build artifacts"
|
|
|
|
|
@echo " rebuild - Clean and rebuild"
|
|
|
|
|
@echo " coverage - Run tests with coverage instrumentation"
|
|
|
|
|
@echo " validate - Validate source files"
|
|
|
|
|
@echo " inspect - Inspect source structure as JSON"
|
|
|
|
|
@echo " help - Show this help message"
|