Static Code Analysis
Check JSON, YAML, TOML and XML syntax with Prek
prek-check is a JSON, YAML, TOML and XML syntax-checking node powered by Prek built-in hooks.
overview
What prek-check does
Check copied data files through Prek built-in check-json, check-yaml, check-toml and check-xml hooks. The fixed configuration ignores repository hook settings and executes no repository-defined scripts. The report retains per-hook statuses, native diagnostics, file lists and hashes.
Only lowercase .json, .yaml, .yml, .toml and .xml files are eligible. Limits are 200 eligible files, 1000 traversed files, 1 MiB per file, 10 MiB total and 30 seconds per hook. Symbolic links and special files are refused; .git is omitted.
Syntax findings produce a successful task report with passed: false. Native runtime/configuration failures fail the task. Inspect each hook result rather than treating task success as valid syntax.
This operation uses 0.5.5. Upstream license: MIT. The source link identifies the program used by this node.
use cases
Where prek-check fits
Check mixed config formats
Run the fixed JSON, YAML, TOML and XML syntax hooks over eligible files.
Collect native parser errors
Retain each native hook diagnostic and its associated file list.
Review files without applying fixes
Inspect results while keeping supplied source files unchanged.
reference
prek-check inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| source | FOLDER | --source | Folder of lowercase .json/.yaml/.yml/.toml/.xml data files, up to 200 eligible files, 1 MiB/file and 10 MiB total; 1000 traversed files. Symlinks refused. Fixed check-json/check-yaml/check-toml/check-xml only; prek.toml and pre-commit configs ignored, no remote hooks or script execution. 30 seconds/hook. Source copied and unchanged. |
Showing key inputs. prek-check exposes 1 inputs in total.
example
Run prek-check
python3 /app/run.py --source ./source ./output{
"tool": "prek-check",
"passed": false,
"failed_hooks": 4,
"file_count": 8
}guidance
Choosing prek-check
Choose this node for four data syntax parsers in one report. YAMLlint adds YAML style rules; XML schema validation and application-specific schemas require separate checks.
ajv-validate
Validates JSON against a schema rather than checking these four data syntaxes.
faq
prek-check questions
related
More Static Code Analysis tools
bandit
Python source in, JSON security findings out.
gitleaks
Detect hardcoded secrets in git repos and plain directories.
gosec
Go AST security scanner for credentials, crypto, and injection.
guarddog
A package coordinate in, indicator hits out.
malcontent-scan
A package coordinate in, behavior findings out.
osv-malicious
A package coordinate in, malware advisory rows out.
Run prek-check yourself
The synthetic run checks json hook report. The excerpt shows selected native fields asserted by saved passing platform verifier; reconstructed excerpt, not full raw artifact. The command shown is the container entrypoint with example paths, not a host-installed CLI command.
Facts on this page come from the live Trickest tool library.