Thank you for your interest in contributing to tsql-scriptdom-java!
This project is a high-performance, deterministic Java port of Microsoft's SqlScriptDOM, designed to power T-SQL static analysis, linters, and the SonarQube Community T-SQL plugin.
To build and contribute to this repository, you will need:
- JDK 17+ (JDK 17 or JDK 21 recommended)
- Apache Maven 3.8+
- Python 3.8+ (required by
exec-maven-pluginduring source generation)
To compile all modules and run the full regression test suite:
mvn clean testTo produce the shaded distribution JAR:
mvn clean package -DskipTestsThe resulting standalone zero-dependency artifact will be located at:
tsql-scriptdom-core/target/tsql-scriptdom-core-<version>.jar
- Regression Test Suite: The regression suite in
tsql-scriptdom-core/src/test/resources/testscripts/contains upstream Microsoft SQL Server regression tests. Any modifications to the parser must maintain a 100% pass rate across all test scripts. - Negative Tests: Scripts expected to fail syntax parsing (or testing deprecated features like
DISK INITorFASTFIRSTROW) must be registered inTSqlRegressionTest.NEGATIVE_TEST_SCRIPTS. - Unit Tests: New features or AST node helpers should include dedicated unit tests using JUnit 5 and AssertJ.
- No External Runtime Dependencies:
tsql-scriptdom-coremust maintain zero external runtime dependencies. Any third-party libraries (such as ANTLR 2) must be shaded and relocated intoio.github.fupacat.internal.*. - Visitor Pattern Integrity: When adding or extending AST nodes, ensure that visitor methods in
TSqlFragmentVisitorandTSqlConcreteFragmentVisitorproperly dispatchvisitandexplicitVisitcalls. - Compatibility Mapping: Features added in specific SQL Server versions must be reflected in
SqlCompatibilityValidatorwith appropriate minimumSqlVersionboundaries.
By contributing to tsql-scriptdom-java, you agree that your contributions will be licensed under the project's MIT License.