plccheck
v2.5.0
Published
Siemens PLC language checker + LSP CLI (SCL/ST/LAD/FBD, etc.)
Readme
plccheck
CLI wrapper for the Siemens PLC checker/LSP written in Go.
Usage
npx plccheck check ./path/to/projectCommands
plccheck serve(LSP server over stdio)plccheck check <files-or-folders...>plccheck emit --target <language> <file>plccheck test [--filter <text>] [--events-json] [--coverage-json <file>] [--coverage-lcov <file>] [--coverage-branches] <file-or-folder>plccheck version
Testing and Coverage
Run tests for a PLC root:
npx plccheck test ./my-plc-projectRequest coverage artifacts in JSON and LCOV formats:
npx plccheck test ./my-plc-project --coverage-json coverage.json --coverage-lcov coverage.infoFor zero-config discovery in the Coverage Gutters VS Code extension, write the LCOV tracefile as lcov.info instead:
npx plccheck test ./my-plc-project --coverage-json coverage.json --coverage-lcov lcov.infoKeep the default Stage 1 line-focused coverage view, but opt into additive Stage 2 branch data when needed:
npx plccheck test ./my-plc-project --coverage-json coverage.json --coverage-branchesNote: --events-json prints a stream of execution events to stdout, while --coverage-json writes a finalized coverage report to a file. By default, the JSON artifact stays statement/line-focused and still includes function summaries/details where available, and LCOV includes the matching function records. --coverage-branches widens the JSON artifact with additive branch summaries/details and also adds LCOV branch records where branch runtime data is available. For AI analysis, use the file artifact from --coverage-json.
Publishing (maintainers)
Initial publish requires npm auth once (to create the package entries in the registry). After that, releases use GitHub Actions + npm Trusted Publishing.
To release a new version:
cd ../.. # repo root
npm version patch # or minor/major
git push --follow-tagsnpm version automatically syncs the version across all plccheck-* platform packages before it creates the git tag.
