Command Line Tool - Refactor
Introduction
Section titled “Introduction”Refactor T-SQL script files using registered code refactorings.
Enlight refactor --inputPath=<path> --outputPath=<path> --refactorings=<refactorings list> [ --connectionString=<connectionString> | --server=<servername> --database=<databasename> [ --user=<username> --password=<password> ] ] Enlight refactor --listParameters
Section titled “Parameters”| Parameter | Description |
|---|---|
| connectionString | SQL connection string the target context database. |
| username | Username for accessing the database. |
| password | SQL connection string. |
| database | Target database name. |
| server | Target SQL Server name and instance name. |
| inputPath | Location of the T-SQL script files. A list of files separated with semicolon can also be provided. The - prefix can be used to exclude specific files. |
| outputPath | Required. Destination folder for the result files. |
| refactorings | Required. A list of code names of refactorings. |
| list | Outputs a list of all registered refactorings. |
Build Machines edition specific parameters:
| Parameters | Description |
|---|---|
| licenseData | Required. License data or activation response file path. |
Examples
Section titled “Examples”Get a list of all available refactorings:
Enlight refactor --listRun refactorings on script files:
Enlight refactor --inputPath="d:\refactor target\**\*.sql" --outputPath="d:\refactor output" --refactorings=RE0001,RE0002,RE0006