Skip to content

Commit 566d72a

Browse files
author
Guy Acosta
committed
Improves project name clarity under restructure for Nuget/DLL support and code cleanup of spacing.
1 parent eca74c0 commit 566d72a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+206
-228
lines changed

AppInspector.CLI/AppInspector.CLI.csproj

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>netcoreapp3.1</TargetFramework>
6+
<RootNamespace>Microsoft.ApplicationInspector.CLI</RootNamespace>
7+
<AssemblyName>ApplicationInspector.CLI</AssemblyName>
8+
<Copyright>(c) Microsoft Corporation. All rights reserved</Copyright>
9+
<Product>Application Inspector</Product>
10+
<Company>Microsoft</Company>
11+
<Authors>Microsoft</Authors>
12+
<Version>0.0.0-placeholder</Version>
13+
<Description>Command line tool for GUI launch of Application Inspector</Description>
14+
<FileVersion>0.0.0.0</FileVersion>
15+
<AssemblyVersion>0.0.0.0</AssemblyVersion>
616
</PropertyGroup>
717

8-
<ItemGroup>
9-
<None Remove="html\partials\_file_listing.liquid" />
10-
<None Remove="html\partials\_report_overview.liquid" />
11-
<None Remove="html\partials\_report_profile.liquid" />
12-
<None Remove="html\partials\_report_summary.liquid" />
13-
</ItemGroup>
14-
1518
<ItemGroup>
1619
<EmbeddedResource Include="html\partials\_file_listing.liquid" />
1720
<EmbeddedResource Include="html\partials\_report_overview.liquid" />
@@ -27,7 +30,7 @@
2730
</ItemGroup>
2831

2932
<ItemGroup>
30-
<ProjectReference Include="..\AppInspector\AppInspector.Lib.csproj" />
33+
<ProjectReference Include="..\AppInspector\AppInspector.Commands.csproj" />
3134
</ItemGroup>
3235

3336
<ItemGroup>

AppInspector.CLI/Program.cs

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,36 @@
11
//Copyright(c) Microsoft Corporation.All rights reserved.
22
// Licensed under the MIT License.
33

4-
using System;
5-
using System.Diagnostics;
64
using CommandLine;
7-
using System.Reflection;
5+
using Microsoft.ApplicationInspector.Commands;
86
using NLog;
9-
using NLog.Targets;
107
using NLog.Config;
8+
using NLog.Targets;
9+
using System;
1110
using System.IO;
12-
using Microsoft.AppInspector;
1311

1412

15-
namespace Microsoft.AppInspector.CLI
13+
namespace Microsoft.ApplicationInspector.CLI
1614
{
17-
1815
class Program
1916
{
2017

21-
public static string GetVersionString()
22-
{
23-
return String.Format("Microsoft Application Inspector {0}", GetVersion());
24-
}
25-
26-
public static string GetVersion()
27-
{
28-
Assembly assembly = Assembly.GetExecutingAssembly();
29-
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);
30-
return fileVersionInfo.ProductVersion;
31-
}
32-
3318
static public Logger Logger { get; set; }
3419

35-
3620
/// <summary>
3721
/// Program entry point which defines command verbs and options to running
3822
/// </summary>
3923
/// <param name="args"></param>
4024
static int Main(string[] args)
4125
{
4226
int finalResult = -1;
43-
27+
4428
WriteOnce.Verbosity = WriteOnce.ConsoleVerbosity.Medium;
4529

4630
try
4731
{
48-
WriteOnce.Info(GetVersionString());
49-
var argsResult = Parser.Default.ParseArguments<AnalyzeCommandOptions,
32+
WriteOnce.Info(Utils.GetVersionString());
33+
var argsResult = Parser.Default.ParseArguments<AnalyzeCommandOptions,
5034
TagDiffCommandOptions,
5135
TagTestCommandOptions,
5236
ExportTagsCommandOptions,
@@ -99,7 +83,7 @@ private static int RunTagDiffCommand(TagDiffCommandOptions opts)
9983
SetupLogging(opts);
10084
return new TagDiffCommand(opts).Run();
10185
}
102-
86+
10387
private static int RunTagTestCommand(TagTestCommandOptions opts)
10488
{
10589
SetupLogging(opts);
@@ -140,7 +124,7 @@ static void SetupLogging(AllCommandOptions opts)
140124
{
141125
throw new OpException(String.Format(ErrMsg.FormatString(ErrMsg.ID.CMD_INVALID_ARG_VALUE, "-v")));
142126
}
143-
127+
144128
using (var fileTarget = new FileTarget()
145129
{
146130
Name = "LogFile",
@@ -154,10 +138,10 @@ static void SetupLogging(AllCommandOptions opts)
154138
config.LoggingRules.Add(new LoggingRule("*", log_level, fileTarget));
155139
}
156140

157-
LogManager.Configuration = config;
141+
LogManager.Configuration = config;
158142
opts.Log = LogManager.GetCurrentClassLogger();
159143
Logger = opts.Log;
160-
Logger.Info("["+ DateTime.Now.ToLocalTime() + "] //////////////////////////////////////////////////////////");
144+
Logger.Info("[" + DateTime.Now.ToLocalTime() + "] //////////////////////////////////////////////////////////");
161145
WriteOnce.Log = Logger;//allows log to be written to as well as console or output file
162146

163147
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"profiles": {
33
"AppInspector.CLI": {
4-
"commandName": "Project"
4+
"commandName": "Project",
5+
"commandLineArgs": "analyze -s c:\\temp\\main.cpp"
56
}
67
}
78
}

AppInspector.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 16
44
VisualStudioVersion = 16.0.29411.108
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppInspector.Lib", "AppInspector\AppInspector.Lib.csproj", "{C6D58D43-481F-456F-90E8-FAC3779E6CC6}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppInspector.Commands", "AppInspector\AppInspector.Commands.csproj", "{C6D58D43-481F-456F-90E8-FAC3779E6CC6}"
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{876245F3-D7C5-4AA3-A288-2CE94BF63B8E}"
99
ProjectSection(SolutionItems) = preProject
@@ -14,7 +14,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppInspector.RulesEngine",
1414
EndProject
1515
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MultiExtractor", "MultiExtractor\MultiExtractor.csproj", "{7C07A2A2-508E-4BBE-873F-F60F9FB4A9D9}"
1616
EndProject
17-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppInspector.CLI", "AppInspector.CLI\AppInspector.CLI.csproj", "{824ED27E-A4CF-46A6-A01F-98B0821EB61C}"
17+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppInspector.CLI", "AppInspector.CLI\AppInspector.CLI.csproj", "{824ED27E-A4CF-46A6-A01F-98B0821EB61C}"
1818
EndProject
1919
Global
2020
GlobalSection(SolutionConfigurationPlatforms) = preSolution

AppInspector/AppInspector.Lib.csproj renamed to AppInspector/AppInspector.Commands.csproj

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@
33
<PropertyGroup>
44
<OutputType>Library</OutputType>
55
<TargetFramework>netcoreapp3.1</TargetFramework>
6+
<PackageId>Microsoft.ApplicationInspector.Commands</PackageId>
7+
<PackageVersion>0.0.0-placeholder</PackageVersion>
68
<PackageProjectUrl>https://github.com/microsoft/ApplicationInspector</PackageProjectUrl>
79
<RepositoryUrl>https://github.com/microsoft/ApplicationInspector</RepositoryUrl>
810
<PackageTags>Security Static Analyzer</PackageTags>
911
<Description>Characterizes software features.</Description>
1012
<Copyright>(c) Microsoft Corporation. All rights reserved</Copyright>
1113
<HighEntropyVA>true</HighEntropyVA>
12-
<PackageId>Microsoft.ApplicationInspector.Lib</PackageId>
1314
<Product>Application Inspector</Product>
1415
<Authors>Microsoft</Authors>
1516
<Version>0.0.0-placeholder</Version>
16-
<AssemblyName>AppInspectorLib</AssemblyName>
17-
<RootNamespace>ApplicationInspector</RootNamespace>
17+
<AssemblyName>ApplicationInspector.Commands</AssemblyName>
18+
<RootNamespace>Microsoft.ApplicationInspector.Commands</RootNamespace>
1819
<StartupObject></StartupObject>
1920
<Company>Microsoft</Company>
2021
<SignAssembly>true</SignAssembly>
@@ -28,19 +29,13 @@
2829
<DefineConstants>TRACE</DefineConstants>
2930
<PlatformTarget>AnyCPU</PlatformTarget>
3031
<Prefer32Bit>false</Prefer32Bit>
32+
<NoWarn>1701;1702;2225</NoWarn>
3133
</PropertyGroup>
3234

3335
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
3436
<DefineConstants />
3537
</PropertyGroup>
3638

37-
<ItemGroup>
38-
<Compile Remove="htmlreport\**" />
39-
<EmbeddedResource Remove="htmlreport\**" />
40-
<EmbeddedResource Remove="linux\**" />
41-
<None Remove="htmlreport\**" />
42-
</ItemGroup>
43-
4439
<ItemGroup>
4540
<PackageReference Include="CommandLineParser" Version="2.6.0" />
4641
<PackageReference Include="DotLiquid" Version="2.0.314" />
@@ -63,6 +58,12 @@
6358
</EmbeddedResource>
6459
</ItemGroup>
6560

61+
<ItemGroup>
62+
<Compile Remove="linux\**" />
63+
<EmbeddedResource Remove="linux\**" />
64+
<None Remove="linux\**" />
65+
</ItemGroup>
66+
6667
<ItemGroup>
6768
<None Update="rules\**">
6869
<CopyToOutputDirectory>Always</CopyToOutputDirectory>

AppInspector/AppInspector.csproj

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)