File tree Expand file tree Collapse file tree
TeamTools.Linter.CommandLine Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ The list of plugins must be specified in the [configuration file](./TeamTools.Li
1717
1818| Parameter | Shortcut | Description |
1919| -----------| ----------| -------------|
20+ | ` --evaluate ` | — | Evaluate mode to test linter features. It uses severity = warning and EvaluateConfig.json |
2021| ` --config ` | ` -c ` | Path to the configuration file |
2122| ` --dir ` | ` -d ` | Path to a directory containing files to be linted |
2223| ` --file ` | ` -f ` | Path to a single file to be linted |
@@ -34,6 +35,17 @@ The list of plugins must be specified in the [configuration file](./TeamTools.Li
3435
3536## Usage Examples
3637
38+ ### 🚀 First time run to evaluate linter features and capabilities
39+
40+ ``` cmd
41+ .\TeamTools.Linter.CommandLine.exe --dir "c:\source\my_project" --evaluate
42+ ```
43+
44+ Evaluate-mode raises minimal severity to ` warning ` and forces ` EvaluateConfig.json ` to be used.
45+ Use this mode to find significant violations in a project which has never been analyzed by this linter before
46+ to test if the linter suffices your needs. Rules related to formatting standard, naming convention and such
47+ are disabled in this mode.
48+
3749### Linting diff for a directory
3850
3951``` cmd
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ namespace TeamTools.TSQL.Linter.CommandLine.Config
88 public class CommandLineOptions
99 {
1010 private string configFile = SanitizePath ( Path . Combine ( AppContext . BaseDirectory , "DefaultConfig.json" ) ) ;
11+ private string evaluateConfigFile = SanitizePath ( Path . Combine ( AppContext . BaseDirectory , "EvaluateConfig.json" ) ) ;
1112 private string directoryName ;
1213 private string fileName ;
1314 private string fileListSource ;
@@ -250,6 +251,23 @@ public string BasePath
250251 HelpText = "Show current version" ) ]
251252 public bool Version { get ; set ; }
252253
254+ [ Option (
255+ longName : "evaluate" ,
256+ Required = false ,
257+ Default = false ,
258+ HelpText = "Use this option for first run to detect significant violations only" ) ]
259+ public bool EvaluateApp
260+ {
261+ set
262+ {
263+ if ( value )
264+ {
265+ minimalSeverity = Severity . Warning ;
266+ configFile = evaluateConfigFile ;
267+ }
268+ }
269+ }
270+
253271 private static string SanitizePath ( string value )
254272 {
255273 if ( string . IsNullOrWhiteSpace ( value ) )
Original file line number Diff line number Diff line change 1+ {
2+ "plugins" : {
3+ "SSDT" : {
4+ "dll" : " ./Plugins/TeamTools.Linter.SSDT/TeamTools.SSDT.ProjectValidator.dll" ,
5+ "config" : " ./Plugins/TeamTools.Linter.SSDT/DefaultConfig.json"
6+ },
7+ "TSQL" : {
8+ "dll" : " ./Plugins/TeamTools.Linter.TSQL/TeamTools.TSQL.Linter.dll" ,
9+ "config" : " ./Plugins/TeamTools.Linter.TSQL/EvaluateConfig.json"
10+ }
11+ },
12+ "ignore" : {
13+ "folders" : [
14+ " .git" ,
15+ " .vs" ,
16+ " .stylecop" ,
17+ " bin" ,
18+ " obj" ,
19+ " Framework" ,
20+ " TestResults" ,
21+ " TestSources" ,
22+ " node_packages" ,
23+ " packages" ,
24+ " tSQLt"
25+ ],
26+ "extensions" : [
27+ " .dll" ,
28+ " .orig" ,
29+ " .exe" ,
30+ " .user" ,
31+ " .local" ,
32+ " .dbmdl" ,
33+ " .jfm" ,
34+ " .dacpac" ,
35+ " .rar" ,
36+ " .zip" ,
37+ " .7z"
38+ ]
39+ },
40+ "options" : {
41+ "mainBranch" : " master"
42+ }
43+ }
Original file line number Diff line number Diff line change 3333 <ItemGroup >
3434 <Content Include =" ..\LICENSE" Pack =" true" CopyToOutputDirectory =" PreserveNewest" />
3535 <Content Include =" DefaultConfig.json" CopyToOutputDirectory =" PreserveNewest" />
36+ <Content Include =" EvaluateConfig.json" CopyToOutputDirectory =" PreserveNewest" />
3637 <Folder Include =" plugins\" />
3738 </ItemGroup >
3839
You can’t perform that action at this time.
0 commit comments