Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikEJ committed Oct 1, 2024
1 parent 94d1144 commit b692836
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/DacpacTool/BuildOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class BuildOptions : BaseOptions

public bool RunCodeAnalysis { get; set; }
public string CodeAnalysisRules { get; set; }
public FileInfo[] CodeAnalysisAssembly { get; set; }
public FileInfo[] CodeAnalysisAssemblies { get; set; }
public bool WarnAsError { get; set; }
public string SuppressWarnings { get; set; }
public FileInfo SuppressWarningsListFile { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions src/DacpacTool/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static async Task<int> Main(string[] args)

new Option<bool>(new string[] { "--runcodeanalysis", "-an" }, "Run static code analysis"),
new Option<string>(new string[] { "--codeanalysisrules", "-ar" }, "List of rules to suppress in format '-Microsoft.Rules.Data.SR0001;-Microsoft.Rules.Data.SR0008'"),
new Option<FileInfo[]>(new string[] { "--codeanalysisassembly", "-aa" }, "Custom code analysis rule assembly to use"),
new Option<FileInfo[]>(new string[] { "--codeanalysisassemblies", "-aa" }, "Custom code analysis rule assemblies to use"),

new Option<bool>(new string[] { "--warnaserror" }, "Treat T-SQL Warnings As Errors"),
new Option<bool>(new string[] { "--generatecreatescript", "-gcs" }, "Generate create script for package"),
Expand Down Expand Up @@ -207,7 +207,7 @@ private static int BuildDacpac(BuildOptions options)
{
var analyzer = new PackageAnalyzer(new ActualConsole(), options.CodeAnalysisRules);

analyzer.Analyze(packageBuilder.Model, options.Output, options.CodeAnalysisAssembly ?? Array.Empty<FileInfo>());
analyzer.Analyze(packageBuilder.Model, options.Output, options.CodeAnalysisAssemblies ?? Array.Empty<FileInfo>());
}

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<ItemGroup>
<!-- These packages adds additional code analysis rules -->
<!-- We recommend using these, but they can be removed if desired -->
<PackageReference Include="ErikEJ.DacFX.SqlServer.Rules" Version="1.1.0" />
<PackageReference Include="ErikEJ.DacFX.TSQLSmellSCA" Version="1.1.0" />
</ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion test/DacpacTool.Tests/PackageAnalyzerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ private FileInfo[] CollectAssemblyPaths()
{
var result = new List<FileInfo>();
var path = Path.GetDirectoryName(Path.Combine(System.Reflection.Assembly.GetAssembly(typeof(PackageAnalyzerTests)).Location));
result.Add(new FileInfo(Path.Combine(path, "SqlServer.Dac.dll")));
result.Add(new FileInfo(Path.Combine(path, "SqlServer.Rules.dll")));
result.Add(new FileInfo(Path.Combine(path, "TSQLSmellSCA.dll")));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ErikEJ.DacFX.SqlServer.Rules" Version="1.0.1" />
<PackageReference Include="ErikEJ.DacFX.SqlServer.Rules" Version="1.1.0" />
</ItemGroup>

<Import Project="$(MSBuildThisFileDirectory)..\..\src\MSBuild.Sdk.SqlProj\Sdk\Sdk.targets" />
Expand Down

0 comments on commit b692836

Please sign in to comment.