A lightweight developer tool for SIMATIC WinCC Open Architecture projects, providing syntax checking for panels and scripts. This package is part of the modular winccoa-tools-pack ecosystem, which delivers modern development tooling, reusable libraries, and VS Code extensions for WinCC OA engineers. github.com
-
Syntax checking for panels and scripts
Run WinCC OA's built-in syntax checker on your project to catch errors before deployment. -
CI/CD ready
Exit code 0 on success, non-zero on errors - perfect for pipeline integration. -
Cross-platform support
Works on Windows and Linux (headless mode with-platform minimal). -
Multiple check modes
Check all, panels only, or scripts only - with optional integrity checking.
npm install @winccoa-tools-pack/npm-winccoa-syntax-checkOr globally:
npm install -g @winccoa-tools-pack/npm-winccoa-syntax-check# Check all panels and scripts
winccoa-syntax-check -v 3.20 -c /path/to/project/config/config
# Check only panels with integrity check
winccoa-syntax-check -v 3.20 -c ./config/config -m panels -i
# Check only scripts in a specific directory
winccoa-syntax-check -v 3.20 -c ./config/config -m scripts -s libs/
# Options:
# -v, --version <ver> WinCC OA version (e.g. 3.20) [required]
# -c, --config <path> WinCC OA project config file [required]
# -m, --mode <mode> Check mode: all, scripts, panels (default: all)
# -i, --integrity Add integrity check
# -s, --scripts <path> Start path for scripts
# -p, --panels <path> Start path for panels
# -t, --timeout <ms> Process timeout in milliseconds (default: 60000)- Requires WinCC OA 3.19+ with UI manager installed.
- The
-syntaxoption only works with-config, not-proj(WinCC OA limitation). - On Linux, the tool uses
-platform minimalfor headless execution.
import { checkSyntax, checkPanels, checkScripts, SyntaxCheckMode } from "@winccoa-tools-pack/npm-winccoa-syntax-check";
// Full syntax check
const result = await checkSyntax({
version: "3.20",
configPath: "/path/to/project/config/config",
mode: SyntaxCheckMode.ALL,
integrity: true,
});
if (!result.success) {
throw new Error(`Syntax check failed (exit ${result.exitCode}): ${result.stderr}`);
}
// Convenience wrappers
const panelsResult = await checkPanels({
version: "3.20",
configPath: "./config/config",
panelsPath: "mySubDir/",
});
const scriptsResult = await checkScripts({
version: "3.20",
configPath: "./config/config",
scriptsPath: "libs/",
});- Non-zero exit code: Inspect
stderrand ensure--versionmatches your WinCC OA installation. - Timeouts: Increase
--timeout/timeoutfor large projects. - Syntax errors not detected: Ensure
-configpoints to a valid WinCC OA project config file.
This package is designed for seamless use with:
-
VS Code extensions for WinCC OA development
Our open source community provides multiple VS Code tools that enhance the engineering workflow for WinCC OA developers. -
Node.js libraries
Works side-by-side with other libraries in the winccoa-tools-pack suite (project management, core utilities, testing, etc.). -
CI/CD automation
Ideal for pipelines needing validation of WinCC OA projects.
# Install dependencies
npm install
# Build the library
npm run build
# Run tests
npm test
# Lint code
npm run lintSpecial thanks to all our contributors who make this project possible!
- Martin Pokorny (@mPokornyETM) - Creator & Lead Developer
- And many more amazing contributors!
This project is licensed under the MIT License - see the LICENSE file for details.
WinCC OA and Siemens are trademarks of Siemens AG. This project is not affiliated with, endorsed by, or sponsored by Siemens AG. This is a community-driven open source project created to enhance the development experience for WinCC OA developers.
Thank you for using WinCC OA tools package! We're excited to be part of your development journey.
Happy Coding! 🚀
Made with ❤️ for and by the WinCC OA community