Click or drag to resize

Command Line Tool - Refactor

Refactor T-SQL script files using registered code refactorings.

This topic contains the following sections:

Usage
1enlight.exe refactor
2/refactorings:<refactorings>
3/inputpath:<paths> |/i:<paths>
4/outputpath:<outputpath> | /o:<outputpath>
5[ /verbosity: <verbosity> | /v: <verbosity> ]
6[ /recursive]
1enlight.exe refactor /list
Parameters

Parameter

Description

/inputpath:<paths> or /i:<paths>

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:<outputpath> or /o:<outputpath>

Destination folder for the result files.

/refactorings:<refactorings>

A list of code names of the refactorings which to be applied. For a list of registered refactoirngs use the /list param.

/list

Outputs a list of all registered refactorings.

/verbosity:<verbosity> or /v:<verbosity>

Output verbosity level. Supported values: quiet, normal and detail.

/recursive

Optional. Include files in subfolders.

Examples

Apply three refactorings to the T-SQL files in specified input folder and create output files in specified folder using given layout template.

1enlight.exe refactor
2/i:"c:\sourcepath\*.sql"
3/o:"c:\sourcepath\reformated"
4/refacotrings:"RE0001,RE0002,RE0006"
5/verbosity:detail

Apply single refactoring to the T-SQL files.

1enlight.exe refactor
2/refacotrings:"RE0001"
3/inputpath: "E:\Scripts\*.sql";-"E:\Scripts\Excluded*.sql"
4/outputpath: "E:\Scripts\Reformatted"

Get a list of all available refactorings.

1enlight.exe refactor /list