Skip to content

Commit

Permalink
Cleaning up
Browse files Browse the repository at this point in the history
Removing unused code and comments
  • Loading branch information
digitalcoyote committed Jan 31, 2021
1 parent 371cee1 commit a9c22e8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Src/NuGetDefense/NuGetDefense.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<PackageId>NuGetDefense.Tool</PackageId>
<PackAsTool>true</PackAsTool>
<ToolCommandName>nugetdefense</ToolCommandName>
<Version>2.0.3-pre0001</Version>
<Version>2.1.0-pre0008</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Src/NuGetDefense/NuGetDefense.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<metadata>
<id>NuGetDefense</id>
<title>NuGetDefense</title>
<version>2.1.0-pre0007</version>
<version>2.1.0-pre0010</version>
<authors>Curtis Carter</authors>
<owners>Curtis Carter</owners>
<projectUrl>https://digitalcoyote.github.io/NuGetDefense/</projectUrl>
Expand Down Expand Up @@ -36,7 +36,7 @@
<file src="bin/Release/net5.0/Serilog.dll" target="tools/net5.0/Serilog.dll" />
<file src="bin/Release/net5.0/Serilog.Sinks.Console.dll" target="tools/net5.0/Serilog.Sinks.Console.dll" />
<file src="bin/Release/net5.0/Serilog.Sinks.File.dll" target="tools/net5.0/Serilog.Sinks.File.dll" />
<!-- <file src="bin/Release/net5.0/System.Text.Json.dll" target="tools/net5.0/System.Text.Json.dll" />-->
<file src="bin/Release/net5.0/System.Text.Json.dll" target="tools/net5.0/System.Text.Json.dll" />
<file src="bin/Release/net5.0/VulnerabilityData.bin" target="tools/net5.0/VulnerabilityData.bin" />
</files>
</package>
13 changes: 1 addition & 12 deletions Src/NuGetDefense/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ private static int Main(string[] args)
Log.Logger.Verbose("Started NuGetDefense with arguments: {args}", args);
var targetFramework = args.Length == 2 ? args[1] : "";

if (args.Length > 2)
{

}
else if (args[0].EndsWith(".sln", StringComparison.OrdinalIgnoreCase))
if (args[0].EndsWith(".sln", StringComparison.OrdinalIgnoreCase))
{
var projects = DotNetSolution.Load(args[0]).Projects.Select(p => p.Path).ToArray();
var specificFramework = !string.IsNullOrWhiteSpace(targetFramework);
Expand All @@ -76,13 +72,6 @@ private static int Main(string[] args)
}
else if (_settings.CheckReferencedProjects)
{
// var slnFile = Directory.GetFiles(Path.GetDirectoryName(args[0]) ?? AppContext.BaseDirectory, "*.sln").FirstOrDefault();
// if(string.IsNullOrWhiteSpace(slnFile)) slnFile = Directory.GetFiles(Directory.GetParent(Path.GetDirectoryName(args[0]) ?? AppContext.BaseDirectory)?.FullName ?? AppContext.BaseDirectory, "*.sln").FirstOrDefault();
// if (string.IsNullOrWhiteSpace(slnFile))
// throw new FileNotFoundException(
// "CheckReferencedProjects Only works if the solution file is in the same directory of parent directory of the project file.");
// DotNetProject.Load(args[0]).ProjectReferences.Select(p => p.FilePath);

var projects = new List<string>{args[0]};
GetProjectsReferenced(in args[0], in projects);
var specificFramework = !string.IsNullOrWhiteSpace(targetFramework);
Expand Down
2 changes: 1 addition & 1 deletion Src/NuGetDefenseTests/NuGetDefenseTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.0.1">
<PackageReference Include="coverlet.collector" Version="3.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit a9c22e8

Please sign in to comment.