Skip to content

Commit

Permalink
Merge branch 'master' into users/ednakamu/moving-exporter-to-driver
Browse files Browse the repository at this point in the history
  • Loading branch information
eddynaka committed Sep 6, 2020
2 parents bf3be91 + 9870138 commit d3fe08f
Show file tree
Hide file tree
Showing 104 changed files with 1,033 additions and 1,147 deletions.
4 changes: 3 additions & 1 deletion scripts/Projects.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ $Projects.Libraries = @(
"Sarif",
"Sarif.Converters",
"Sarif.Driver",
"Sarif.WorkItems"
"Sarif.Multitool.Library"
"Sarif.WorkItems",
"WorkItems"
)

$Projects.Applications = @(
Expand Down
2 changes: 1 addition & 1 deletion src/ESLint.Formatter/readme.MD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ It is available as an npm module [@microsoft/eslint-formatter-sarif](https://www
./node-modules/.bin/eslint -f @microsoft/eslint-formatter-sarif -o yourfile.sarif yourfile.js
```

Note that you *cannot* use the abbreviated form `-f sarif`, because that only works when the npm module name is of the form `eslint-formatter-example`, and the ESLint SARIF formatter module is not `eslint-formatter-sarif`; it's `@microsoft/eslint-formatter-sarif`.
Note that you *cannot* use the abbreviated form `-f sarif`, because that only works when the npm module name is of the form `eslint-formatter-example`, and the ESLint SARIF formatter module is not `eslint-formatter-sarif`; it's `@microsoft/eslint-formatter-sarif`. Alternatively, you can use the form `-f @microsoft/sarif`.

# Developer details

Expand Down
2 changes: 0 additions & 2 deletions src/Nuget/Sarif.Multitool.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@
/>

<file src="src\ReleaseHistory.md" />
<file src="policies\github-dsp.config.xml" target="policies" />
<file src="policies\github-dsp.config.sarif-external-properties" target="policies" />
<file src="src\Sarif.Multitool\**\*.cs" target="src" />
</files>
</package>
8 changes: 8 additions & 0 deletions src/ReleaseHistory.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# SARIF Package Release History (SDK, Driver, Converters, and Multitool)

## **v2.3.5** [Sdk](https://www.nuget.org/packages/Sarif.Sdk/2.3.5) | [Driver](https://www.nuget.org/packages/Sarif.Driver/2.3.5) | [Converters](https://www.nuget.org/packages/Sarif.Converters/2.3.5) | [Multitool](https://www.nuget.org/packages/Sarif.Multitool/2.3.5) | [Multitool Library](https://www.nuget.org/packages/Sarif.Multitool.Library/2.3.5)
* FEATURE: COMMAND-LINE BREAKING: Validation rule `SARIF2005.ProvideToolProperties` now requires `informationUri`, it allows `dottedQuadFileVersion` to satisfy the requirement that version information be present, and it is configurable.
* FEATURE: COMMAND-LINE BREAKING: The analysis rules that validate a SARIF file's compatibility with the GitHub Developer Security Portal now have rule ids that begin with `DSP` rather than `SARIF`.
* FEATURE: Extract the public APIs from Sarif.Multitool into a new dependency package Sarif.Multitool.Library. Sarif.Multitool remains as a dotnet tool package.
* FEATURE: Validation rule `SARIF2012` now checks for the presence of a friendly name in PascalCase in the `name` property, and is renamed from `ProvideHelpUris` to `ProvideRuleProperties`.
* FEATURE: The Multitool `rewrite` command now accepts `VersionControlInformation` as an argument to the `--insert` option. This argument populates `run.versionControlProvenance`, and it re-expresses all absolute URIs as relative references with respect to the nearest enclosing repository root, if any.

## **v2.3.4** [Sdk](https://www.nuget.org/packages/Sarif.Sdk/2.3.4) | [Driver](https://www.nuget.org/packages/Sarif.Driver/2.3.4) | [Converters](https://www.nuget.org/packages/Sarif.Converters/2.3.4) | [Multitool](https://www.nuget.org/packages/Sarif.Multitool/2.3.4)
* COMMAND-LINE BREAKING: Change `merge` command output directory argument name to `output-directory`.
* FEATURE: Add analysis rules appropriate for SARIF files that are to be uploaded to the GitHub Developer Security Portal.
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace Microsoft.CodeAnalysis.Sarif.Multitool
{
public abstract class CommandBase
{
internal const int SUCCESS = 0;
internal const int FAILURE = 1;
public const int SUCCESS = 0;
public const int FAILURE = 1;

protected static bool ValidateNonNegativeCommandLineOption<T>(long optionValue, string optionName)
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,10 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices.WindowsRuntime;

using Microsoft.CodeAnalysis.Sarif.Driver;
using Microsoft.CodeAnalysis.Sarif.Driver.Sdk;
using Microsoft.CodeAnalysis.Sarif.Processors;
using Microsoft.CodeAnalysis.Sarif.Visitors;
using Microsoft.CodeAnalysis.Sarif.Writers;
using Microsoft.Extensions.Options;
using Microsoft.TeamFoundation.Work.WebApi;
using Microsoft.VisualStudio.Services.OAuth;

using Newtonsoft.Json;

Expand Down
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 70 additions & 0 deletions src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Label="AssemblyAttributes">
<AssemblyTitle>SARIF Multitool Library</AssemblyTitle>
<Description>The public API exposing the commands used by the SARIF Multitool.</Description>
</PropertyGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.props))\build.props" />

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<RootNamespace>Microsoft.CodeAnalysis.Sarif.Multitool</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Json.Pointer" Version="1.1.2" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="$(MsBuildThisFileDirectory)..\Sarif\Schemata\sarif-$(SchemaVersionAsPublishedToSchemaStoreOrg).json" Link="sarif-2.1.0.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<ItemGroup>
<Compile Update="MultitoolResources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>MultitoolResources.resx</DependentUpon>
</Compile>
<Compile Update="Rules\RuleResources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>RuleResources.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="MultitoolResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>MultitoolResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Rules\RuleResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>RuleResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<None Include="default.configuration.xml"
Pack="true"
PackagePath="lib/netstandard2.0;lib/net461"
CopyToOutputDirectory="PreserveNewest" />
<None Include="..\..\policies\*"
Pack="true"
PackagePath="policies" />
<None Include="**\*.cs"
Pack="true"
PackagePath="src" />
<None Include="..\ReleaseHistory.md"
Pack="true"
PackagePath="/" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Sarif.Converters\Sarif.Converters.csproj" />
<ProjectReference Include="..\Sarif.Driver\Sarif.Driver.csproj" />
<ProjectReference Include="..\Sarif.WorkItems\Sarif.WorkItems.csproj" />
<ProjectReference Include="..\Sarif\Sarif.csproj" />
</ItemGroup>

</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
41 changes: 5 additions & 36 deletions src/Sarif.Multitool/Sarif.Multitool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<PropertyGroup Label="AssemblyAttributes">
<AssemblyTitle>SARIF Multitool</AssemblyTitle>
<Description>Command line tool to perform transformations of input files to SARIF.</Description>
<Description>Command line tool to manipulate SARIF files.</Description>
</PropertyGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.props))\build.props" />
Expand All @@ -39,45 +39,17 @@

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.7.82" />
<PackageReference Include="Microsoft.Json.Pointer" Version="1.1.1" />
<PackageReference Include="Microsoft.Json.Schema" Version="1.1.1" />
<PackageReference Include="Microsoft.Json.Schema.Validation" Version="1.1.1" />
<PackageReference Include="Microsoft.Json.Pointer" Version="1.1.2" />
<PackageReference Include="Microsoft.Json.Schema" Version="1.1.2" />
<PackageReference Include="Microsoft.Json.Schema.Validation" Version="1.1.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Sarif\Sarif.csproj" />
<ProjectReference Include="..\Sarif.Driver\Sarif.Driver.csproj" />
<ProjectReference Include="..\Sarif.WorkItems\Sarif.WorkItems.csproj" />
<ProjectReference Include="..\Sarif.Converters\Sarif.Converters.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Update="MultitoolResources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>MultitoolResources.resx</DependentUpon>
</Compile>
<Compile Update="Rules\RuleResources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>RuleResources.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="MultitoolResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>MultitoolResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Rules\RuleResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>RuleResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<ProjectReference Include="..\Sarif.Multitool.Library\Sarif.Multitool.Library.csproj" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include=".\DotnetToolSettings.xml" CopyToOutputDirectory="PreserveNewest" />
<EmbeddedResource Include="$(MsBuildThisFileDirectory)..\Sarif\Schemata\sarif-$(SchemaVersionAsPublishedToSchemaStoreOrg).json" Link="sarif-2.1.0.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<ItemGroup>
Expand All @@ -87,9 +59,6 @@
<None Update="appsettings.local.json">
<CopyToOutputDirectory Condition="'$(Configuration)' == 'Debug'">PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="default.configuration.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Loading

0 comments on commit d3fe08f

Please sign in to comment.