Skip to content

Commit dd9f976

Browse files
committed
update build config, fix minor code smell
minor fixes in readme
1 parent 6caa35f commit dd9f976

4 files changed

Lines changed: 16 additions & 17 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The list of plugins must be specified in the [configuration file](./TeamTools.Li
1616
## Parameters
1717

1818
| Parameter | Shortcut | Description |
19-
|-----------|---------|-------------|
19+
|-----------|----------|-------------|
2020
| `--config` | `-c` | Path to the configuration file |
2121
| `--dir` | `-d` | Path to a directory containing files to be linted |
2222
| `--file` | `-f` | Path to a single file to be linted |
@@ -26,7 +26,7 @@ The list of plugins must be specified in the [configuration file](./TeamTools.Li
2626
| `--severity` | `-s` | Minimum severity level of findings to include in results. Default is `info` (includes all errors, warnings, hints, and info messages). Use `warning` to include only errors and warnings, or `error` for only explicit errors. Severity levels for each rule are defined in the plugin configuration |
2727
| `--basepath` | `-r` | Base path for files. If specified, relative paths (with this base) will be used in logs and output instead of absolute paths |
2828
| `--verbose` | `-v` | Print detailed progress information to the console |
29-
| `--withversion` | `-n` | Print the version number before outputting results. Unlike `--version`, this allows linting to proceed while also showing the current version in the log |
29+
| `--with-version` | `-n` | Print the version number before outputting results. Unlike `--version`, this allows linting to proceed while also showing the current version in the log |
3030
| `--diff` || Lint all files differing from the `master` branch. Works only when running on files in a Git repository (Git must be in `PATH`). Alternatively, compute the file list manually, save it to a text file, and pass its path via `--filelist` |
3131
| `--quiet` || Do not return a non‑zero exit code if linting findings are detected |
3232
| `--version` || Print the utility version without performing other operations |
@@ -48,7 +48,7 @@ The diff is calculated via Git against the main branch; only modified files are
4848
.\TeamTools.Linter.CommandLine.exe --file "c:\source\my_project\Stored procedures\dbo.my_proc.sql"
4949
```
5050

51-
### Linting all files in a directory and excluding info messages
51+
### Linting all files in a directory excluding info messages
5252

5353
```cmd
5454
.\TeamTools.Linter.CommandLine.exe --dir "c:\source\my_project" --severity warning

TeamTools.Linter.CommandLine/TeamTools.Linter.CommandLine.csproj

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@
3838

3939
<!-- Stuff for embedding plugin binaries into the build output -->
4040
<PropertyGroup>
41-
<SqlLinterProj>TeamTools.TSQL.Linter</SqlLinterProj>
42-
<FileLinterProj>TeamTools.StructuredFiles.Linter</FileLinterProj>
43-
<SsdtLinterProj>TeamTools.SSDT.ProjectValidator</SsdtLinterProj>
41+
<SqlLinterProj>TeamTools.Linter.TSQL</SqlLinterProj>
42+
<SsdtLinterProj>TeamTools.Linter.SSDT</SsdtLinterProj>
4443

45-
<PluginsPath>$(MSBuildThisFileDirectory)..</PluginsPath>
44+
<PluginsPath>$(MSBuildThisFileDirectory)..\..</PluginsPath>
4645
<PluginSourceSubfolder Condition="'$(TargetFramework)'=='netcoreapp3.1'">bin\$(Configuration)\netstandard2.0</PluginSourceSubfolder>
4746
<PluginSourceSubfolder Condition="'$(TargetFramework)'!='netcoreapp3.1'">bin\$(Configuration)\$(TargetFramework)</PluginSourceSubfolder>
4847
<PluginNugetTargetSubfolder>tools\$(TargetFramework)\any\plugins</PluginNugetTargetSubfolder>
@@ -54,9 +53,6 @@
5453
<SqlLinterBin Include="$(PluginsPath)\$(SqlLinterProj)\$(PluginSourceSubfolder)\**\*.*">
5554
<InProject>false</InProject>
5655
</SqlLinterBin>
57-
<FileLinterBin Include="$(PluginsPath)\$(FileLinterProj)\$(PluginSourceSubfolder)\**\*.*">
58-
<InProject>false</InProject>
59-
</FileLinterBin>
6056
<SsdtLinterBin Include="$(PluginsPath)\$(SsdtLinterProj)\$(PluginSourceSubfolder)\**\*.*">
6157
<InProject>false</InProject>
6258
</SsdtLinterBin>
@@ -79,7 +75,6 @@
7975

8076
<Target Name="CopyPlugins" AfterTargets="AfterBuild">
8177
<Copy SourceFiles="@(SqlLinterBin)" DestinationFiles="$(TargetDir)\plugins\$(SqlLinterProj)\%(RecursiveDir)%(FileName)%(Extension)" />
82-
<Copy SourceFiles="@(FileLinterBin)" DestinationFiles="$(TargetDir)\plugins\$(FileLinterProj)\%(RecursiveDir)%(FileName)%(Extension)" />
8378
<Copy SourceFiles="@(SsdtLinterBin)" DestinationFiles="$(TargetDir)\plugins\$(SsdtLinterProj)\%(RecursiveDir)%(FileName)%(Extension)" />
8479
</Target>
8580

@@ -91,9 +86,6 @@
9186
<TfmSpecificPackageFile Include="@(SsdtLinterBin)">
9287
<PackagePath>$(PluginNugetTargetSubfolder)\$(SsdtLinterProj)\%(RecursiveDir)%(FileName)%(Extension)</PackagePath>
9388
</TfmSpecificPackageFile>
94-
<TfmSpecificPackageFile Include="@(FileLinterBin)">
95-
<PackagePath>$(PluginNugetTargetSubfolder)\$(FileLinterProj)\%(RecursiveDir)%(FileName)%(Extension)</PackagePath>
96-
</TfmSpecificPackageFile>
9789
</ItemGroup>
9890
</Target>
9991
</Project>

TeamTools.Linter.CommandLineTests/UnitTests/CommandLineOptionsTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ namespace TeamTools.TSQL.Linter.CommandLineTests
99
[Category("Linter.ConsoleExe")]
1010
public class CommandLineOptionsTests
1111
{
12-
private Dictionary<string, List<string>> argVariants;
1312
#if Windows
1413
private const string BasePath = @"c:\";
1514
#else
1615
private const string BasePath = @"/home/";
1716
#endif
1817

18+
private Dictionary<string, List<string>> argVariants;
19+
1920
[SetUp]
2021
public void Setup()
2122
{

cli-linter.code-workspace

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"Nuget.Config": "xml"
1616
},
1717
"[xml]": {
18-
"editor.tabSize": 2
18+
"editor.tabSize": 2,
19+
"editor.wordWrap": "off"
1920
},
2021
"editor.insertSpaces": true,
2122
"editor.formatOnSave": true,
@@ -39,6 +40,10 @@
3940
"editor.suggest.insertMode": "replace",
4041
"editor.defaultFormatter": "vscode.json-language-features"
4142
},
43+
"[code-workspace]": {
44+
"editor.tabSize": 2,
45+
"editor.defaultFormatter": "esbenp.prettier-vscode"
46+
},
4247
"markdownlint.config": {
4348
"MD033": {
4449
"allowed_elements": ["p"],
@@ -134,7 +139,8 @@
134139
// To prevent weird values from local computer environment variables.
135140
// This will be converted into "Any CPU" by Directory.Build.props
136141
"PLATFORM": ""
137-
}
142+
},
143+
"xml.format.maxLineWidth": 0
138144
},
139145
"extensions": {
140146
"recommendations": [

0 commit comments

Comments
 (0)